belliottsmith commented on code in PR #243:
URL: https://github.com/apache/cassandra-accord/pull/243#discussion_r2285394670
##########
accord-core/src/main/java/accord/coordinate/ExecuteTxn.java:
##########
@@ -78,12 +86,63 @@
import static accord.primitives.SaveStatus.Stable;
import static accord.primitives.Status.Durability.DurablyStable;
import static accord.primitives.Status.Phase.Execute;
+import static accord.topology.Topologies.SelectNodeOwnership.SHARE;
import static java.util.concurrent.TimeUnit.MICROSECONDS;
// TODO (expected): return Waiting from ReadData if not ready to execute, and
do not submit more than one speculative retry in this case
// TODO (expected): by default, if we can execute locally, never contact a
remote replica regardless of local outcome
public class ExecuteTxn extends ReadCoordinator<ReadReply>
{
+ class StableTracker extends QuorumIdTracker implements Callback<ReadReply>
+ {
+ private boolean hasInformedDecidedOrSucceeded;
+ private boolean informOnSuccess;
+
+ public StableTracker(Topologies topologies)
+ {
+ super(topologies);
+ }
+
+ @Override
+ public void onSuccess(Id from, ReadReply reply)
+ {
+ if ((reply.isOk() || reply == Waiting) && RequestStatus.Success ==
recordSuccess(from) && informOnSuccess)
+ informStable();
Review Comment:
we only return `RequestStatus.Success` once
--
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]