ifesdjeen commented on code in PR #3045:
URL: https://github.com/apache/cassandra/pull/3045#discussion_r1474450773
##########
src/java/org/apache/cassandra/tcm/ClusterMetadataService.java:
##########
@@ -243,13 +243,24 @@ public static void initializeForTools(boolean
loadSSTables)
{
if (instance != null)
return;
- ClusterMetadata emptyFromSystemTables =
emptyWithSchemaFromSystemTables(Collections.singleton("DC1"));
-
emptyFromSystemTables.schema.initializeKeyspaceInstances(DistributedSchema.empty(),
loadSSTables);
- emptyFromSystemTables = emptyFromSystemTables.forceEpoch(Epoch.EMPTY);
- LocalLog.LogSpec logSpec = new
LocalLog.LogSpec().withInitialState(emptyFromSystemTables)
- .withStorage(new
AtomicLongBackedProcessor.InMemoryStorage());
- LocalLog log = LocalLog.sync(logSpec);
- log.ready();
+ ClusterMetadata emptyFromSystemTables =
emptyWithSchemaFromSystemTables(Collections.singleton("DC1"))
+ .forceEpoch(Epoch.EMPTY);
+
+ LocalLog.LogSpec logSpec = LocalLog.logSpec()
+
.withInitialState(emptyFromSystemTables)
+ .loadSSTables(loadSSTables)
+ .initializeKeyspaceInstances(false)
+ .withDefaultListeners(false)
+ .withListener(new
SchemaListener(loadSSTables) {
Review Comment:
We need to initialize keyspaces (which happens in the pre-commit), but we do
not need schema keyspace update, gossip hook, and other things that are
happening in the post-commit hook.
--
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]