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


##########
src/java/org/apache/cassandra/service/accord/AccordCommandStore.java:
##########
@@ -505,32 +507,27 @@ else if (!CommandsForKey.managesExecution(txnId) && 
command.hasBeen(PreCommitted
         }
 
         @Override
-        public void load(Command command, OnDone onDone)
+        public AsyncChain<Void> load(TxnId txnId, Supplier<Command> supplier)
         {
-            store.execute(context(command, SYNC), safeStore -> 
loadInternal(command, safeStore))
-                 .begin((unused, throwable) -> {
-                     if (throwable != null)
-                         onDone.failure(throwable);
-                     else
-                         onDone.success();
-                 });
+            if (store.caches.commands().isReferenced(txnId))
+                return AsyncResults.SUCCESS_NULL;
+
+            Command command = supplier.get();
+            return store.submit(context(command, SYNC),

Review Comment:
   Is the `commandStore` going to load this also by reading from the journal 
because the command is in its context? Might it be easier even to just leave it 
entirely to the `commandStore`?



-- 
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-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to