belliottsmith commented on code in PR #254:
URL: https://github.com/apache/cassandra-accord/pull/254#discussion_r2355931614


##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -367,19 +369,22 @@ protected void updatedRedundantBefore(SafeCommandStore 
safeStore, RedundantBefor
             }
         }
         TxnId clearProgressLogBefore = 
unsafeGetRedundantBefore().minShardAndLocallyAppliedBefore();
-        List<TxnId> clearing = ((DefaultProgressLog) 
progressLog).activeBefore(clearProgressLogBefore);
-        for (TxnId txnId : clearing)
-        {
-            GlobalCommand globalCommand = commands.get(txnId);
-            Invariants.require(globalCommand != null && 
!globalCommand.isEmpty());
-            Command command = globalCommand.value();
-            StoreParticipants participants = 
command.participants().filter(LOAD, safeStore, txnId, 
command.executeAtIfKnown());
-            Cleanup cleanup = Cleanup.shouldCleanup(FULL, txnId, 
command.executeAtIfKnown(), command.saveStatus(), command.durability(), 
participants, unsafeGetRedundantBefore(), durableBefore());
-            Invariants.require(command.hasBeen(Applied)
-                               || cleanup.compareTo(Cleanup.TRUNCATE) >= 0
-                               || (durableBefore().min(txnId) != Universal &&
-                                      ((command.participants().stillExecutes() 
!= null && command.participants().stillExecutes().isEmpty())
-                                      || 
!Route.isFullRoute(command.route()))));
+        if (progressLog instanceof DefaultProgressLog)

Review Comment:
   We don't use this for some tests, which is the only reason we have this 
check. It's all test only, so not sure the noise would be worth it...



##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -367,19 +369,22 @@ protected void updatedRedundantBefore(SafeCommandStore 
safeStore, RedundantBefor
             }
         }
         TxnId clearProgressLogBefore = 
unsafeGetRedundantBefore().minShardAndLocallyAppliedBefore();
-        List<TxnId> clearing = ((DefaultProgressLog) 
progressLog).activeBefore(clearProgressLogBefore);
-        for (TxnId txnId : clearing)
-        {
-            GlobalCommand globalCommand = commands.get(txnId);
-            Invariants.require(globalCommand != null && 
!globalCommand.isEmpty());
-            Command command = globalCommand.value();
-            StoreParticipants participants = 
command.participants().filter(LOAD, safeStore, txnId, 
command.executeAtIfKnown());
-            Cleanup cleanup = Cleanup.shouldCleanup(FULL, txnId, 
command.executeAtIfKnown(), command.saveStatus(), command.durability(), 
participants, unsafeGetRedundantBefore(), durableBefore());
-            Invariants.require(command.hasBeen(Applied)
-                               || cleanup.compareTo(Cleanup.TRUNCATE) >= 0
-                               || (durableBefore().min(txnId) != Universal &&
-                                      ((command.participants().stillExecutes() 
!= null && command.participants().stillExecutes().isEmpty())
-                                      || 
!Route.isFullRoute(command.route()))));
+        if (progressLog instanceof DefaultProgressLog)

Review Comment:
   (but happy to if you think it is)
   



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