dcapwell commented on code in PR #101:
URL: https://github.com/apache/cassandra-accord/pull/101#discussion_r1664559344
##########
accord-core/src/main/java/accord/coordinate/CoordinatePreAccept.java:
##########
@@ -152,7 +152,12 @@ void onNewEpochTopologyMismatch(TopologyMismatch mismatch)
void onPreAccepted(Topologies topologies)
{
Timestamp executeAt = foldl(oks, (ok, prev) ->
mergeMax(ok.witnessedAt, prev), Timestamp.NONE);
- node.withEpoch(executeAt.epoch(), () -> onPreAccepted(topologies,
executeAt, oks));
+ node.withEpoch(executeAt.epoch(), (ignored, withEpochFailure) -> {
Review Comment:
another advantage is that you can focus on the happy-path when building the
chain and only focus on the failure in one place. With callbacks we keep
having to focus on both cases in every single block...
--
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]