belliottsmith commented on code in PR #233: URL: https://github.com/apache/cassandra-accord/pull/233#discussion_r2246270365
########## accord-core/src/main/java/accord/local/CommandStore.java: ########## @@ -666,11 +666,33 @@ protected void updatedRedundantBefore(SafeCommandStore safeStore, RedundantBefor listeners.clearBefore(this, clearWaitingBefore); } - protected void markSynced(SafeCommandStore safeStore, TxnId syncId, Ranges ranges) + protected final boolean isWaitingOnSync(TxnId syncId, Ranges ranges) + { + if (waitingOnSync.isEmpty()) + return false; + + for (Map.Entry<Long, WaitingOnSync> e : waitingOnSync.entrySet()) + { + if (e.getKey() > syncId.epoch()) + break; + + Ranges remaining = e.getValue().ranges; + boolean intersects = remaining.intersects(ranges); + if (intersects) + return true; + } + + return true; Review Comment: you're right, though this would have been fine (just caused some unnecessary work). I've actually tweaked this a little in the follow-up that addresses potential issues with `registerTransitive`. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org