belliottsmith commented on code in PR #3490:
URL: https://github.com/apache/cassandra/pull/3490#discussion_r1756754925


##########
src/java/org/apache/cassandra/service/accord/interop/AccordInteropApply.java:
##########
@@ -248,20 +245,14 @@ public void onChange(SafeCommandStore safeStore, 
SafeCommand safeCommand)
             case PreCommitted:
             case Committed:
             case PreApplied:
-                return;
+                return true;
 
             case Applied:
             case Invalidated:
             case Truncated:
         }
 
-        if (safeCommand.removeListener(this))
-            ack();
-    }
-
-    @Override
-    public PreLoadContext listenerPreLoadContext(TxnId caller)
-    {
-        return PreLoadContext.contextFor(txnId);
+        ack();

Review Comment:
   We return `false` here, so the listener should be deregistered immediately 
and not invoked again. This is different to `ReadData`, which stays registered 
to be notified of being superseded (e.g. if the result is `Applied` before we 
finish, so that our read is now potentially invalid)
   



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