frankgh commented on code in PR #2519:
URL: https://github.com/apache/cassandra/pull/2519#discussion_r1276827027
##########
src/java/org/apache/cassandra/db/ColumnFamilyStore.java:
##########
@@ -558,7 +558,7 @@ public ColumnFamilyStore(Keyspace keyspace,
repairManager = new CassandraTableRepairManager(this);
sstableImporter = new SSTableImporter(this);
- if (SchemaConstants.isSystemKeyspace(getKeyspaceName()))
+ if (DatabaseDescriptor.isClientOrToolInitialized() ||
SchemaConstants.isSystemKeyspace(getKeyspaceName()))
Review Comment:
hmm, changing the existing behavior makes me a little nervous in general.
Especially this change, since we are going from just a warning to throwing an
exception there might be unintended consequences downstream.
I think the proposed fix is more than sufficient. `TopPartitionTracker` is
only ever initialized from `ColumnFamilyStore`. Additionally,
`SystemKeyspace.getTopPartitions` only gets called from the
`TopPartitionTracker` constructor.
--
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]