adelapena commented on a change in pull request #1168:
URL: https://github.com/apache/cassandra/pull/1168#discussion_r758347304
##########
File path: src/java/org/apache/cassandra/schema/Schema.java
##########
@@ -606,11 +606,16 @@ public synchronized void clear()
* in-memory representation got out of sync somehow with what's on disk.
*/
public synchronized void reloadSchemaAndAnnounceVersion()
+ {
+ reloadSchema();
+ updateVersionAndAnnounce();
+ }
+
+ public synchronized void reloadSchema()
{
Keyspaces before = keyspaces.filter(k ->
!SchemaConstants.isLocalSystemKeyspace(k.name));
Keyspaces after = SchemaKeyspace.fetchNonSystemKeyspaces();
merge(Keyspaces.diff(before, after));
- updateVersionAndAnnounce();
Review comment:
I think that the version is updated and announced by the call to
`StorageService.initServer -> StorageService.prepareToJoin ->
Schema.updateVersionAndAnnounce` that is done by `CassandraDaeamon#setup`
[here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/service/CassandraDaemon.java#L417),
after the commitlog has been replayed some lines above,
[here](https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/service/CassandraDaemon.java#L357).
So if I'm understanding it correctly the version is updated after replaying
the commit log.
--
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]