bdeggleston commented on a change in pull request #1:
URL: https://github.com/apache/cassandra-accord/pull/1#discussion_r840836119
##########
File path: accord-core/src/main/java/accord/messages/BeginRecovery.java
##########
@@ -118,32 +132,46 @@ public void process(Node node, Id replyToNode, long
replyToMessage)
ok1.earlierAcceptedNoWitness.addAll(ok2.earlierAcceptedNoWitness);
ok1.earlierAcceptedNoWitness.removeAll(ok1.earlierCommittedWitness);
return new RecoverOk(
- ok1.status,
- Ballot.max(ok1.accepted, ok2.accepted),
- Timestamp.max(ok1.executeAt, ok2.executeAt),
- deps,
- ok1.earlierCommittedWitness,
- ok1.earlierAcceptedNoWitness,
- ok1.rejectsFastPath | ok2.rejectsFastPath,
- ok1.writes, ok1.result);
+ txnId, ok1.status,
+ Ballot.max(ok1.accepted, ok2.accepted),
+ Timestamp.max(ok1.executeAt, ok2.executeAt),
+ deps,
+ ok1.earlierCommittedWitness,
+ ok1.earlierAcceptedNoWitness,
+ ok1.rejectsFastPath | ok2.rejectsFastPath,
+ ok1.writes, ok1.result);
}).orElseThrow();
node.reply(replyToNode, replyToMessage, reply);
if (reply instanceof RecoverOk && ((RecoverOk) reply).status ==
Applied)
{
// disseminate directly
RecoverOk ok = (RecoverOk) reply;
- node.send(node.cluster().forKeys(txn.keys), new Apply(txnId, txn,
ok.executeAt, ok.deps, ok.writes, ok.result));
+ ConfigurationService configService = node.configService();
+ if (ok.executeAt.epoch > configService.currentEpoch())
+ {
+ configService.fetchTopologyForEpoch(ok.executeAt.epoch, () ->
disseminateApply(node, ok));
+ return;
+ }
+ disseminateApply(node, ok);
}
}
+ private void disseminateApply(Node node, RecoverOk ok)
Review comment:
that was fixed in the topology-integration branch since it indeed turned
out to be unsafe
--
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]