aweisberg commented on code in PR #56:
URL: https://github.com/apache/cassandra-accord/pull/56#discussion_r1296131489


##########
accord-core/src/test/java/accord/impl/list/ListAgent.java:
##########
@@ -46,11 +52,16 @@ public ListAgent(long timeout, Consumer<Throwable> 
onFailure, Consumer<Runnable>
     @Override
     public void onRecover(Node node, Result success, Throwable fail)
     {
+        if (fail != null)
+        {
+            checkState(success == null, "fail (%s) and success (%s) are both 
not null", fail, success);
+            // We don't really process errors for Recover here even though it 
is provided in the interface

Review Comment:
   We can't report back because without the `success` there is no `requestId` 
to respond with. We can't use uncaught exception handler because the exception 
isn't typically uncaught tit's actually been passed by to the callback of 
`Recover`. `onRecover` is an odd one because it's kind of informative, but it 
isn't the callback for recover it's just some notification the agent gets.
   
   I need to look at why `onRecover` is involved in sending the reply at all. 
Why doesn't it get done in the callback for `Recover`? Why does it exist at all?



-- 
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]

Reply via email to