bereng commented on code in PR #2713:
URL: https://github.com/apache/cassandra/pull/2713#discussion_r1335529352
##########
src/java/org/apache/cassandra/schema/Schema.java:
##########
@@ -77,8 +77,19 @@ public class Schema implements SchemaProvider
public static final Schema instance = new Schema();
- private volatile Keyspaces distributedKeyspaces = Keyspaces.none();
- private volatile Keyspaces distributedAndLocalKeyspaces;
+ private static class Holder
+ {
+ private final Keyspaces distributedKeyspaces;
+ private final Keyspaces distributedAndLocalKeyspaces;
+
+ private Holder(Keyspaces distributedKeyspaces, Keyspaces
distributedAndLocalKeyspaces)
Review Comment:
This is just to force both to be updated at the same time and avoid them
getting out of sync?
--
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]