Mmuzaf commented on code in PR #2519:
URL: https://github.com/apache/cassandra/pull/2519#discussion_r1276585634
##########
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:
Thanks for the test. To me it looks a bit strange when we call a method in
the `SystemKeyspace` and get an error that the system keyspace doesn't exist,
so I guess we should throw an error or an exception for this case. This in turn
leads me to think that the exception handling is wrong and we should fix that
as well.
Here is the line:
SystemKeyspace.getTopPartitions(SystemKeyspace.java:1903)
So, I propose to throw an exception for the case when SystemKeyspace throws
a `KeyspaceNotDefinedException` related to the system keyspace. WDYT?
This is what I'm talking about (we don't have to to store the keyspace name
in the `KeyspaceNotDefinedException` it just looks more natural to me):
https://github.com/apache/cassandra/compare/trunk...Mmuzaf:cassandra: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]