This is an automated email from the ASF dual-hosted git repository. benedict pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
commit 4232d02a3e4c992ea313563b25b900b6e6c9123e Author: Benedict Elliott Smith <bened...@apache.org> AuthorDate: Tue Jan 23 13:43:40 2024 +0000 extra validation --- accord-core/src/main/java/accord/local/Command.java | 16 ++++++++++++++++ accord-core/src/main/java/accord/local/SaveStatus.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/accord-core/src/main/java/accord/local/Command.java b/accord-core/src/main/java/accord/local/Command.java index 9665f4c..98db534 100644 --- a/accord-core/src/main/java/accord/local/Command.java +++ b/accord-core/src/main/java/accord/local/Command.java @@ -404,6 +404,22 @@ public abstract class Command implements CommonAttributes break; } } + switch (validate.saveStatus().execution) + { + case NotReady: + case CleaningUp: + break; + case ReadyToExclude: + Invariants.checkState(validate.asCommitted().waitingOn == null); + break; + case WaitingToExecute: + case ReadyToExecute: + case Applied: + case Applying: + case WaitingToApply: + Invariants.checkState(validate.asCommitted().waitingOn != null); + break; + } return validate; } } diff --git a/accord-core/src/main/java/accord/local/SaveStatus.java b/accord-core/src/main/java/accord/local/SaveStatus.java index 2005e12..e8f41c7 100644 --- a/accord-core/src/main/java/accord/local/SaveStatus.java +++ b/accord-core/src/main/java/accord/local/SaveStatus.java @@ -67,7 +67,7 @@ public enum SaveStatus PreCommittedWithAcceptedDeps (Status.PreCommitted, Covering, DefinitionUnknown, ExecuteAtKnown, DepsProposed, Unknown, LocalExecution.ReadyToExclude), PreCommittedWithDefinition (Status.PreCommitted, Full, DefinitionKnown, ExecuteAtKnown, DepsUnknown, Unknown, LocalExecution.ReadyToExclude), PreCommittedWithDefinitionAndAcceptedDeps(Status.PreCommitted, Full, DefinitionKnown, ExecuteAtKnown, DepsProposed, Unknown, LocalExecution.ReadyToExclude), - Committed (Status.Committed, LocalExecution.WaitingToExecute), + Committed (Status.Committed, LocalExecution.ReadyToExclude), Stable (Status.Stable, LocalExecution.WaitingToExecute), ReadyToExecute (Status.ReadyToExecute, LocalExecution.ReadyToExecute), PreApplied (Status.PreApplied, LocalExecution.WaitingToApply), --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org