Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18697

Skip ColumnFamilyStore#topPartitions initialization when client or tool mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.1.4
    • Tool/bulk load
    • None

    Description

      In org.apache.cassandra.db.ColumnFamilyStore the topPartitions is initialized when the keyspace is not a system keyspace. However, when running the cassandra library as client mode or tool mode, the initialization also happens. However, TopPartitionTracker performs queries to the system keyspace, which might not be available in most of the cases. For that reason, we should skip initialization of topPartitions when running on client mode or tool mode.

      In utilities and external libraries, this can produce a warning that is displayed with a stack trace. This warning can be misleading for end users, and can cause confusion. But more importantly, the initialization of topPartitions is not required in this mode.

      The warning is similar to this:

          WARN org.apache.cassandra.db.SystemKeyspace: Could not load stored top SIZES partitions for ...
          org.apache.cassandra.db.KeyspaceNotDefinedException: keyspace system does not exist
                  at org.apache.cassandra.schema.Schema.validateTable(Schema.java:xxx) ~[?:?]
                  at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
                  at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
                  at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:xxx) ~[?:?]
                  at org.apache.cassandra.cql3.QueryProcessor.parseAndPrepare(QueryProcessor.java:xxx) ~[?:?]
                  ... 

      Attachments

        Activity

          People

            frankgh Francisco Guerrero
            frankgh Francisco Guerrero
            Francisco Guerrero
            Dinesh Joshi, Yifan Cai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m