This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch CASSANDRA-19877 in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
commit bf34e0b079700a3866bbd23cdb2c31ee6fa02268 Author: Alex Petrov <oleksandr.pet...@gmail.com> AuthorDate: Mon Sep 16 21:27:46 2024 +0200 Compaction --- accord-core/src/main/java/accord/local/Commands.java | 16 ++++++++++++---- 1 file changed, 12 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 43b8d77f..11d3fa08 100644 --- a/accord-core/src/main/java/accord/local/Commands.java +++ b/accord-core/src/main/java/accord/local/Commands.java @@ -851,6 +851,17 @@ public class Commands || (command.route() == null || Infer.safeToCleanup(safeStore, command, command.route(), command.executeAt()) || safeStore.isFullyPreBootstrapOrStale(command, command.route().participants())) , "Command %s could not be truncated", command); + Command result = purge(command, maybeFullRoute, cleanup); + + safeCommand.update(safeStore, result); + safeStore.progressLog().clear(safeCommand.txnId()); + if (notifyListeners) + safeStore.notifyListeners(safeCommand, command); + + return result; + } + public static Command purge(Command command, @Nullable Unseekables<?> maybeFullRoute, Cleanup cleanup) + { Command result; switch (cleanup) { @@ -878,10 +889,7 @@ public class Commands break; } - safeCommand.update(safeStore, result); - safeStore.progressLog().clear(safeCommand.txnId()); - if (notifyListeners) - safeStore.notifyListeners(safeCommand, command); + return result; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org