This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
commit 0f9f201f047dbb7780797d018dffef244dc7ea17 Author: Benedict Elliott Smith <bened...@apache.org> AuthorDate: Fri May 9 13:39:08 2025 -0700 Accord: On restart, while replying the journal the linearizability check logic found incorrect ordering and rejected startup patch by Benedict Elliott Smith; reviewed by Alex Petrov and David Capwell for CASSANDRA-20641 --- accord-core/src/main/java/accord/local/Commands.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accord-core/src/main/java/accord/local/Commands.java b/accord-core/src/main/java/accord/local/Commands.java index a1abe351..cf48d228 100644 --- a/accord-core/src/main/java/accord/local/Commands.java +++ b/accord-core/src/main/java/accord/local/Commands.java @@ -557,12 +557,12 @@ public class Commands } } - protected static void postApply(SafeCommandStore safeStore, TxnId txnId, long t0) + protected static void postApply(SafeCommandStore safeStore, TxnId txnId, long t0, boolean forceApply) { SafeCommand safeCommand = safeStore.get(txnId); Command command = safeCommand.current(); logger.trace("{} applied, setting status to Applied and notifying listeners", command); - if (command.hasBeen(Applied)) + if (command.hasBeen(Applied) && !forceApply) return; safeCommand.applied(safeStore); @@ -595,7 +595,7 @@ public class Commands return command.writes().apply(safeStore, executes, command.partialTxn()) // TODO (expected): once we guarantee execution order KeyHistory can be ASYNC .flatMap(unused -> unsafeStore.build(contextFor(txnId, executes, SYNC), ss -> { - postApply(ss, txnId, t0); + postApply(ss, txnId, t0, false); return null; })); } @@ -612,7 +612,7 @@ public class Commands TxnId txnId = command.txnId(); return command.writes().apply(safeStore, executes, command.partialTxn()) .flatMap(unused -> unsafeStore.build(context, ss -> { - postApply(ss, txnId, -1); + postApply(ss, txnId, -1, true); return null; })); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org