This is an automated email from the ASF dual-hosted git repository.

benedict pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
     new 8fd6935bc0 ninja: rollback mistake from 'fix replay OOM and TFK 
exceptions'
8fd6935bc0 is described below

commit 8fd6935bc0587bb9af2859d8565ea9a1deb9d4bc
Author: Benedict Elliott Smith <[email protected]>
AuthorDate: Tue Nov 5 09:24:25 2024 +0000

    ninja: rollback mistake from 'fix replay OOM and TFK exceptions'
---
 .../org/apache/cassandra/service/accord/AccordCommandStore.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/src/java/org/apache/cassandra/service/accord/AccordCommandStore.java 
b/src/java/org/apache/cassandra/service/accord/AccordCommandStore.java
index 8773dcd294..92ad629eba 100644
--- a/src/java/org/apache/cassandra/service/accord/AccordCommandStore.java
+++ b/src/java/org/apache/cassandra/service/accord/AccordCommandStore.java
@@ -89,6 +89,7 @@ import 
org.apache.cassandra.utils.concurrent.UncheckedInterruptedException;
 
 import static accord.api.ConfigurationService.EpochReady.DONE;
 import static accord.local.KeyHistory.COMMANDS;
+import static accord.primitives.SaveStatus.Applying;
 import static accord.primitives.Status.Committed;
 import static accord.primitives.Status.Invalidated;
 import static accord.primitives.Status.Truncated;
@@ -678,7 +679,11 @@ public class AccordCommandStore extends CommandStore
                          safeStore -> {
                              SafeCommand safeCommand = 
safeStore.unsafeGet(txnId);
                              Command local = safeCommand.current();
-                             Commands.maybeExecute(safeStore, safeCommand, 
local, true, true);
+                             if (local.hasBeen(Truncated))
+                                 return;
+
+                             if (local.saveStatus().compareTo(Applying) >= 0) 
Commands.applyWrites(safeStore, context, local).begin(agent);
+                             else Commands.maybeExecute(safeStore, 
safeCommand, local, true, true);
                          })
                 .begin((unused, throwable) -> {
                     if (throwable != null)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to