belliottsmith commented on code in PR #219:
URL: https://github.com/apache/cassandra-accord/pull/219#discussion_r2227881048
##########
accord-core/src/main/java/accord/coordinate/CoordinateTransaction.java:
##########
@@ -138,21 +139,21 @@ else if (tracker.hasMediumPathAccepted() &&
txnId.hasMediumPath())
Deps deps = mergeFastOrMediumDeps(oks);
if (deps != null)
{
- proposeAdapter().propose(node, executor, topologies, route,
Accept.Kind.MEDIUM, Ballot.ZERO, txnId, txn, txnId, deps, callback);
- node.agent().eventListener().onMediumPathTaken(txnId, deps);
+ node.agent().coordinatorEvents().onPreAccepted(txnId, deps,
false);
+ proposeAdapter().propose(node, executor, topologies, route,
MEDIUM, Ballot.ZERO, txnId, txn, txnId, deps, callback);
return;
}
}
else if (executeAt.is(REJECTED))
{
proposeAndCommitInvalidate(node, executor, Ballot.ZERO, txnId,
route.homeKey(), route, executeAt, callback);
- node.agent().eventListener().onRejected(txnId);
+ node.agent().coordinatorEvents().onRejected(txnId);
return;
}
Deps deps = Deps.merge(oks.valuesAsNullableList(), oks.domainSize(),
List::get, ok -> ok.deps);
- proposeAdapter().propose(node, executor, topologies, route,
Accept.Kind.SLOW, Ballot.ZERO, txnId, txn, executeAt, deps, callback);
- node.agent().eventListener().onSlowPathTaken(txnId, deps);
+ node.agent().coordinatorEvents().onPreAccepted(txnId, deps, false);
Review Comment:
This information is now provided to onExecuting which is a consistent place
to provide it. I don't mind providing it here as well, but we don't actually
know yet if the path will end up being taken successfully. isStable implies the
fast path was taken, but the relevant fact there is that we will proceed to
execution, and so these are the deps we may want to count (and this is what the
parameter is used for in both the onPreAccept and onAccept method) - unless we
want to count deps separately for each phase (which seems perhaps a bit over
the top unless we find a need for it later).
--
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]