jacek-lewandowski commented on a change in pull request #1168:
URL: https://github.com/apache/cassandra/pull/1168#discussion_r756842833
##########
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'm not sure about that, but I was wondering whether we should update
the version after replaying the commit log? I justify my question by the fact
that schema and its version is read before replaying the commit log, if there
are mutations replayed, the versions is likely to change - by recalculating it,
we may avoid unnecessary syncing schema with other nodes - does it make sense?
--
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]