ifesdjeen commented on code in PR #212:
URL: https://github.com/apache/cassandra-accord/pull/212#discussion_r2173260399


##########
accord-core/src/main/java/accord/impl/CommandChange.java:
##########
@@ -334,10 +334,9 @@ public Cleanup shouldCleanup(Input input, RedundantBefore 
redundantBefore, Durab
             //  Perhaps we can special-case loading, and simply update the 
participants here so we can avoid doing it again on access
             if (input == Input.FULL)
             {
-                if (saveStatus == null)
+                if (saveStatus == null || participants == null)

Review Comment:
   I'm a bit concerned here, but maybe incorrectly: if we mistakenly lose 
participants, we will end up purging entire command change (writing this 
actually only losing participants seems equally bad).



##########
accord-core/src/main/java/accord/messages/GetEphemeralReadDeps.java:
##########
@@ -72,10 +73,10 @@ public GetEphemeralReadDepsOk apply(SafeCommandStore 
safeStore)
         long latestEpoch = Math.max(safeStore.node().epoch(), node.epoch());
 
         // TODO (desired): only return failure if we've participated in a sync 
point that could migrate coordination to the newer epoch
-        if (latestEpoch > executionEpoch && 
safeStore.ranges().removed(executionEpoch, latestEpoch).intersects(scope))
+        StoreParticipants participants = StoreParticipants.read(safeStore, 
scope, txnId, minEpoch, latestEpoch);
+        if (latestEpoch > executionEpoch && 
(safeStore.ranges().removed(executionEpoch, 
latestEpoch).intersects(participants.owns()) || 
node.topology().hasReplicationMaybeChanged(participants.owns(), 
executionEpoch)))

Review Comment:
   Are brackets intended around `(safeStore.ranges().removed(executionEpoch, 
latestEpoch).intersects(participants.owns())` ? Just making sure they're not 
misplaced.



##########
accord-core/src/main/java/accord/topology/Topology.java:
##########
@@ -46,6 +46,7 @@
 import accord.utils.ArrayBuffers.IntBuffers;
 import accord.utils.IndexedBiFunction;
 import accord.utils.IndexedConsumer;
+import accord.utils.IndexedFoldToLong;

Review Comment:
   Nit: unused



-- 
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]

Reply via email to