dcapwell commented on code in PR #2144:
URL: https://github.com/apache/cassandra/pull/2144#discussion_r1106247248


##########
src/java/org/apache/cassandra/service/accord/async/AsyncOperation.java:
##########
@@ -123,55 +131,114 @@ protected void setState(State state)
         this.state = state;
     }
 
-    /**
-     * callback for loader and writer
-     */
-    @Override
-    public void accept(Object o, Throwable throwable)
+    private void callback(Object o, Throwable throwable)
     {
         if (throwable != null)
         {
             logger.error(String.format("Operation %s failed", this), 
throwable);
             state = State.FAILED;
-            tryFailure(throwable);
+            fail(throwable);

Review Comment:
   I took a stab to start a fuzz test for this, and found issues with write 
path as well, see 
https://github.com/dcapwell/cassandra/tree/feedback/immutable-state
   
   
https://github.com/dcapwell/cassandra/commit/eef07eef25300434919e5fb118305c7137535e68
   
   The bug was the following
   
   1) the write actually fails, but we de-ref Node... so we now have a dirty 
write in-memory that was not durable
   2) CommandsForKeys cache isn't cleaned up (test detects this and fails)



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