dcapwell commented on code in PR #46:
URL: https://github.com/apache/cassandra-accord/pull/46#discussion_r1201115335
##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -230,16 +230,20 @@ public synchronized void onTopologyUpdate(Topology
topology)
{
Epochs current = epochs;
- checkArgument(topology.epoch == current.nextEpoch());
+ checkArgument(topology.epoch == current.nextEpoch(), "Expected
topology update %d to be %d", topology.epoch, current.nextEpoch());
EpochState[] nextEpochs = new EpochState[current.epochs.length + 1];
List<Set<Id>> pendingSync = new
ArrayList<>(current.pendingSyncComplete);
Set<Id> alreadySyncd = Collections.emptySet();
if (!pendingSync.isEmpty())
{
- EpochState currentEpoch = current.epochs[0];
- if (current.epochs[0].syncComplete())
- currentEpoch.markPrevSynced();
- alreadySyncd = pendingSync.remove(0);
+ // if empty, then notified about an epoch from a peer before first
epoch seen
+ if (current.epochs.length != 0)
Review Comment:
Burn didn’t hit this but C* did. Epoch 1 is known on N1 and a request is
sent to N2 before it learns of epoch 1… so this is an empty array
--
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]