You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jacek-lewandowski (via GitHub)" <gi...@apache.org> on 2023/08/17 13:08:32 UTC
[GitHub] [cassandra-accord] jacek-lewandowski commented on a diff in pull request #53: wip
jacek-lewandowski commented on code in PR #53:
URL: https://github.com/apache/cassandra-accord/pull/53#discussion_r1297197885
##########
accord-core/src/main/java/accord/coordinate/CoordinatePreAccept.java:
##########
@@ -253,7 +259,13 @@ void onNewEpoch(Topologies prevTopologies, Timestamp executeAt, List<PreAcceptOk
public void accept(T success, Throwable failure)
{
if (failure instanceof CoordinationFailed)
+ {
((CoordinationFailed) failure).set(txnId, route.homeKey());
+ if (failure instanceof Preempted)
+ node.agent().metricsEventsListener().onPreempted(txnId);
+ else if (failure instanceof Timeout)
+ node.agent().metricsEventsListener().onTimeout(txnId);
+ }
Review Comment:
I didn't want to make the events listener be responsible for interpretation of the exception. This is cross-project API and the way how we learn about preemption or timeout may change over the time - for example, it may not be an exception at all, or we may move the reporting to the place where the exception is not thrown yet...
--
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-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org