aweisberg commented on code in PR #54:
URL: https://github.com/apache/cassandra-accord/pull/54#discussion_r1286381290
##########
accord-core/src/main/java/accord/local/CommandStores.java:
##########
@@ -351,6 +350,7 @@ private synchronized TopologyUpdate updateTopology(Node
node, Snapshot prev, Top
Ranges removeRanges = subtracted.slice(current, Minimal);
if (!removeRanges.isEmpty())
{
+ // TODO (required): This is updating the a non-volatile field
in the previous Snapshot, why modify it at all, even with volatile the
guaranteed visibility is weak even with mutual exclusion
Review Comment:
@belliottsmith Why does this update the previous snapshot in place? We can't
guarantee anything in flight reads it so they might as well read it out of the
current snapshot?
Can we make a copy to avoid the mutability issue?
--
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]