ifesdjeen commented on code in PR #3976: URL: https://github.com/apache/cassandra/pull/3976#discussion_r1992193214
########## src/java/org/apache/cassandra/service/accord/AccordVerbHandler.java: ########## @@ -66,35 +63,15 @@ public void doVerb(Message<T> message) throws IOException */ Node.Id fromNodeId = endpointMapper.mappedId(message.from()); long waitForEpoch = request.waitForEpoch(); - ClusterMetadata cm = ClusterMetadata.current(); - boolean cmUpToDate = ClusterMetadata.current().epoch.getEpoch() >= waitForEpoch; - if (node.topology().hasAtLeastEpoch(waitForEpoch) && cmUpToDate) + if (node.topology().hasAtLeastEpoch(waitForEpoch)) request.process(node, fromNodeId, message.header); else { - // TODO (required): review this claim. Downstream from `withEpoch`, we do call fetch log, albeit from _CMS_, since we - // do not know the peer there. - // withEpoch does not reliably ensure that TCM is up to date, if Accord has the topology it won't - // wait for TCM to come up to date, so do it here in the verb handler - if (!cmUpToDate) - { - ClusterMetadataService.instance().fetchLogFromPeerOrCMSAsync(cm, message.from(), Epoch.create(waitForEpoch)) - .addCallback((success, failure) -> { - node.withEpoch(waitForEpoch, (ignored, withEpochFailure) -> { - if (withEpochFailure != null) - throw new RuntimeException("Timed out waiting for epoch when processing message from " + fromNodeId + " to " + node + " message " + message, withEpochFailure); - request.process(node, fromNodeId, message.header); - }); - }); - } - else - { - node.withEpoch(waitForEpoch, (ignored, withEpochFailure) -> { - if (withEpochFailure != null) - throw new RuntimeException("Timed out waiting for epoch when processing message from " + fromNodeId + " to " + node + " message " + message, withEpochFailure); - request.process(node, fromNodeId, message.header); - }); - } + node.withEpoch(waitForEpoch, (ignored, withEpochFailure) -> { Review Comment: CMS catchup was unnecessary here due to comment in the TODO above. -- 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