dcapwell commented on code in PR #3664:
URL: https://github.com/apache/cassandra/pull/3664#discussion_r1837342983
##########
src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java:
##########
@@ -381,7 +388,7 @@ public synchronized void onNodesRemoved(long epoch,
Topology current, Set<Node.I
private long[] nonCompletedEpochsBefore(long max)
{
LongArrayList notComplete = new LongArrayList();
- for (long epoch = epochs.minEpoch(); epoch <= max && epoch <=
epochs.maxEpoch(); epoch++)
+ for (long epoch = epochs.minEpoch(), maxKnown = epochs.maxEpoch();
epoch <= max && epoch <= maxKnown; epoch++)
Review Comment:
I do think we might due to the fact
`accord.impl.AbstractConfigurationService.AbstractEpochHistory#truncateUntil`
could be called and
`accord.impl.AbstractConfigurationService.AbstractEpochHistory#getOrCreate` can
re-populate the past epochs.
so added the lock
--
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]