dcapwell commented on code in PR #103:
URL: https://github.com/apache/cassandra-accord/pull/103#discussion_r1674885976


##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -98,36 +97,33 @@ static class EpochState
 
             this.addedRanges = 
global.ranges.subtract(prevRanges).mergeTouching();
             this.removedRanges = 
prevRanges.mergeTouching().subtract(global.ranges);
-            this.prevSyncComplete = addedRanges.union(MERGE_ADJACENT, 
prevSyncComplete.subtract(removedRanges));
-            this.curSyncComplete = this.syncComplete = addedRanges;
+            this.syncComplete = addedRanges;
         }
 
-        boolean markPrevSynced(Ranges newPrevSyncComplete)
+        public boolean hasReachedQuorum()
         {
-            newPrevSyncComplete = newPrevSyncComplete.union(MERGE_ADJACENT, 
addedRanges).subtract(removedRanges);
-            if (prevSyncComplete.containsAll(newPrevSyncComplete))
-                return false;
-            
Invariants.checkState(newPrevSyncComplete.containsAll(prevSyncComplete), 
"Expected %s to contain all ranges in %s; but did not", newPrevSyncComplete, 
prevSyncComplete);
-            prevSyncComplete = newPrevSyncComplete;
-            syncComplete = curSyncComplete.slice(newPrevSyncComplete, 
Minimal).union(MERGE_ADJACENT, addedRanges);
-            return true;
+            return syncTracker == null ? true : syncTracker.hasReachedQuorum();
         }
 
-        public boolean hasReachedQuorum()
+        private boolean recordSyncCompleteFromFuture()

Review Comment:
   I actually want to rework this so its node based and not complete based... 
for testing it was easier to do complete based, but in practice node base will 
be best as the property is relative to the node, so node sending for epoch=N 
basically just sent for <= N as well



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