dcapwell commented on code in PR #3842: URL: https://github.com/apache/cassandra/pull/3842#discussion_r1936388652
########## src/java/org/apache/cassandra/service/accord/AccordConfigurationService.java: ########## @@ -416,14 +415,18 @@ void maybeReportMetadata(ClusterMetadata metadata) long epoch = metadata.epoch.getEpoch(); synchronized (epochs) { - if (epochs.maxEpoch() == 0) + long maxEpoch = epochs.maxEpoch(); + if (maxEpoch == 0) { getOrCreateEpochState(epoch); // touch epoch state so subsequent calls see it reportMetadata(metadata); return; } } - getOrCreateEpochState(epoch - 1).acknowledged().addCallback(() -> reportMetadata(metadata)); + + // Create a -1 epoch iif we know this epoch may actually exist + if (metadata.epoch.getEpoch() > minEpoch()) Review Comment: why this change? this worries me. Making sure this protocol was safe took a lot of effort, so adding this extra state into it makes me worry that we will regress... If TCM is reporting, we won't hit this... so only non-TCM reporting should hit this... we should guard there IMO -- 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