bdeggleston commented on code in PR #33:
URL: https://github.com/apache/cassandra-accord/pull/33#discussion_r1101824781


##########
accord-core/src/main/java/accord/impl/SimpleProgressLog.java:
##########
@@ -712,34 +713,39 @@ public void preaccepted(Command command, ProgressShard 
shard)
         }
 
         @Override
-        public void accepted(Command command, ProgressShard shard)
+        public void accepted(SafeCommandStore safeStore, TxnId txnId, 
ProgressShard shard)
         {
+            Command command = safeStore.command(txnId);
             ensureSafeOrAtLeast(command, shard, Uncommitted, Expected);
         }
 
         @Override
-        public void committed(Command command, ProgressShard shard)
+        public void committed(SafeCommandStore safeStore, TxnId txnId, 
ProgressShard shard)
         {
+            Command command = safeStore.command(txnId);
             ensureSafeOrAtLeast(command, shard, CoordinateStatus.Committed, 
NoneExpected);
         }
 
         @Override
-        public void readyToExecute(Command command, ProgressShard shard)
+        public void readyToExecute(SafeCommandStore safeStore, TxnId txnId, 
ProgressShard shard)
         {
+            Command command = safeStore.command(txnId);
             ensureSafeOrAtLeast(command, shard, ReadyToExecute, Expected);
         }
 
         @Override
-        public void executed(Command command, ProgressShard shard)
+        public void executed(SafeCommandStore safeStore, TxnId txnId, 
ProgressShard shard)
         {
+            Command command = safeStore.command(txnId);
             recordApply(command.txnId());
             // this is the home shard's state ONLY, so we don't know it is 
fully durable locally
             ensureSafeOrAtLeast(command, shard, ReadyToExecute, Expected);
         }
 
         @Override
-        public void invalidated(Command command, ProgressShard shard)
+        public void invalidated(SafeCommandStore safeStore, TxnId txnId, 
ProgressShard shard)

Review Comment:
   to prevent stale objects being passed in. I'd expect that to accept 
LiveCommand or whatever once that's done



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