This is an automated email from the ASF dual-hosted git repository. ifesdjeen pushed a commit to branch startup-sequence-improvements in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
commit 52336917311130e53d6982b34c3ef1d28bb555e5 Author: Benedict Elliott Smith <[email protected]> AuthorDate: Mon Jul 28 17:18:33 2025 +0100 - Handle another truncateWithOutcome edge case --- accord-core/src/main/java/accord/local/Cleanup.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/accord-core/src/main/java/accord/local/Cleanup.java b/accord-core/src/main/java/accord/local/Cleanup.java index 6d1c3be4..b8cfb582 100644 --- a/accord-core/src/main/java/accord/local/Cleanup.java +++ b/accord-core/src/main/java/accord/local/Cleanup.java @@ -40,7 +40,6 @@ import static accord.local.RedundantStatus.Property.LOCALLY_DEFUNCT; import static accord.local.RedundantStatus.Property.LOCALLY_DURABLE_TO_DATA_STORE; import static accord.local.RedundantStatus.Property.LOCALLY_REDUNDANT; import static accord.local.RedundantStatus.Property.NOT_OWNED; -import static accord.local.RedundantStatus.Property.PRE_BOOTSTRAP_OR_STALE; import static accord.local.RedundantStatus.Property.SHARD_APPLIED; import static accord.local.RedundantStatus.Property.TRUNCATE_BEFORE; import static accord.primitives.Known.KnownExecuteAt.ApplyAtKnown; @@ -199,7 +198,7 @@ public enum Cleanup Invariants.paranoid(redundant.all(SHARD_APPLIED)); if (!redundant.all(LOCALLY_DURABLE_TO_DATA_STORE)) - return truncateWithOutcome(txnId, redundant, participants, min); + return truncateWithOutcome(txnId, input, redundant, min); if (saveStatus.compareTo(Vestigial) >= 0) { @@ -223,7 +222,7 @@ public enum Cleanup // (if the condition is false and we fall through to removing Outcome) case MajorityOrInvalidated: case Majority: - return truncateWithOutcome(txnId, redundant, participants, min); + return truncateWithOutcome(txnId, input, redundant, min); case UniversalOrInvalidated: case Universal: @@ -307,9 +306,9 @@ public enum Cleanup return INVALIDATE; } - private static Cleanup truncateWithOutcome(TxnId txnId, RedundantStatus status, StoreParticipants participants, Cleanup atLeast) + private static Cleanup truncateWithOutcome(TxnId txnId, Input input, RedundantStatus status, Cleanup atLeast) { - return atLeast.compareTo(TRUNCATE_WITH_OUTCOME) > 0 ? atLeast : (participants.executes() == null || !participants.stillExecutes().isEmpty()) && !status.all(PRE_BOOTSTRAP_OR_STALE) + return atLeast.compareTo(TRUNCATE_WITH_OUTCOME) > 0 ? atLeast : input == PARTIAL || !status.all(LOCALLY_DEFUNCT) ? TRUNCATE_WITH_OUTCOME : TRUNCATE; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
