frankgh opened a new pull request, #2519:
URL: https://github.com/apache/cassandra/pull/2519
This commit skips the initialization of `topPartitions` in
`org.apache.cassandra.db.ColumnFamilyStore` when running in client or tool
mode. The `TopPartitionTracker` class will attempt to query the system
keyspace, which when running in client or tool mode will not be part of the
KeyspaceMetadata. This causes a warning to be printed out with a stacktrace
that can be misleading. 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)
~[?:?]
...
```
In this commit, we check whether we run in client or tool mode, and skip
initialization of `topPartitions` in those cases.
Thanks for sending a pull request! Here are some tips if you're new here:
[CASSANDRA-18697](https://issues.apache.org/jira/browse/CASSANDRA-18697)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]