dcapwell commented on code in PR #50:
URL: https://github.com/apache/cassandra-accord/pull/50#discussion_r1263007386
##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -212,32 +250,87 @@ public void syncComplete(Id node, long epoch)
checkArgument(epoch > 0);
if (epoch > currentEpoch)
{
- int idx = (int) (epoch - (1 + currentEpoch));
- for (int i=pendingSyncComplete.size(); i<=idx; i++)
- pendingSyncComplete.add(new HashSet<>());
+ pending(epoch).syncComplete.add(node);
+ }
+ else
+ {
+ int i = indexOf(epoch);
+ if (i < 0 || !epochs[i].recordSyncComplete(node))
+ return;
+
+ while (--i >= 0 && epochs[i].markPrevSynced(epochs[i +
1].syncComplete)) {}
Review Comment:
since we push to `head` but walk `tail`, I flipped the direction to be
```
for (int past = i + 1; past < epochs.length; past++)
epochs[past].markPrevSynced(epochs[past - 1].syncComplete);
```
this now has the same issue, but hits what I actually expected
```
Expected [(201,400]] to contain all ranges in [(0,200]]; but did not
```
For the C* case, deleting the keyspace will cause the ranges to be removed,
which should cause this check to fail
--
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]