dcapwell commented on code in PR #2245:
URL: https://github.com/apache/cassandra/pull/2245#discussion_r1163015348
##########
src/java/org/apache/cassandra/service/accord/AccordCallback.java:
##########
@@ -32,18 +34,18 @@
class AccordCallback<T extends Reply> implements RequestCallback<T>
{
private static final Logger logger =
LoggerFactory.getLogger(AccordCallback.class);
- private final Callback<T> callback;
+ private final SafeCallback<T> callback;
- public AccordCallback(Callback<T> callback)
+ public AccordCallback(CommandStore commandStore, Callback<T> callback)
{
- this.callback = callback;
+ this.callback = new SafeCallback<>(commandStore, callback);
}
@Override
public void onResponse(Message<T> msg)
Review Comment:
`timeout` will be done, but will use the `onFailure` method, which sets
`failure`.... `timeout` method is syntax sugar for some accord code to mark
failed
```
public void timeout(Node.Id to)
{
failure(to, new Timeout(null, null));
}
```
In C* we do
```
private static Throwable convertReason(RequestFailureReason reason)
{
return reason == RequestFailureReason.TIMEOUT ?
new Timeout(null, null) :
new RuntimeException(reason.toString());
}
```
I do not know how to do `slowResponse`, but `timeout` is covered
--
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]