Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-18378

CEP-15 (Accord) accord.messages.Defer rejects Recurrent retry of Commit

Details

    Description

      java.lang.IllegalStateException: Recurrent retry of Commit{…}
      	at accord.messages.Defer.add(Defer.java:63)
      	at accord.messages.Commit.apply(Commit.java:167)
      	at accord.messages.Commit.apply(Commit.java:42)
      	at org.apache.cassandra.service.accord.async.AsyncOperation$ForFunction.apply(AsyncOperation.java:321)
      	at org.apache.cassandra.service.accord.async.AsyncOperation$ForFunction.apply(AsyncOperation.java:308)
      	at org.apache.cassandra.service.accord.async.AsyncOperation.runInternal(AsyncOperation.java:226)
      	at org.apache.cassandra.service.accord.async.AsyncOperation.run(AsyncOperation.java:268)
      

      Attachments

        Issue Links

          Activity

            dcapwell David Capwell added a comment -

            Hit this in BurnTest while debugging https://issues.apache.org/jira/browse/CASSANDRA-18364 and think its a rather simple fix, so will handle there

             $ git diff
            diff --git a/accord-core/src/main/java/accord/messages/Commit.java b/accord-core/src/main/java/accord/messages/Commit.java
            index ce010ae..fc756b3 100644
            --- a/accord-core/src/main/java/accord/messages/Commit.java
            +++ b/accord-core/src/main/java/accord/messages/Commit.java
            @@ -162,7 +162,8 @@ public class Commit extends TxnRequest<ReadNack>
                         case Insufficient:
                             SafeCommand safeCommand = safeStore.command(txnId);
                             Invariants.checkState(!safeCommand.current().known().isDefinitionKnown());
            -                if (defer == null)
            +                // When isDone this.process() is called and all CommandStores run apply again; so safe to create a new one
            +                if (defer == null || defer.isDone)
                                 defer = new Defer(DefinitionOnly, Committed.minKnown, Commit.this);
                             defer.add(safeStore, safeCommand, safeStore.commandStore());
                             return ReadNack.NotCommitted;
            
            dcapwell David Capwell added a comment - Hit this in BurnTest while debugging https://issues.apache.org/jira/browse/CASSANDRA-18364 and think its a rather simple fix, so will handle there $ git diff diff --git a/accord-core/src/main/java/accord/messages/Commit.java b/accord-core/src/main/java/accord/messages/Commit.java index ce010ae..fc756b3 100644 --- a/accord-core/src/main/java/accord/messages/Commit.java +++ b/accord-core/src/main/java/accord/messages/Commit.java @@ -162,7 +162,8 @@ public class Commit extends TxnRequest<ReadNack> case Insufficient: SafeCommand safeCommand = safeStore.command(txnId); Invariants.checkState(!safeCommand.current().known().isDefinitionKnown()); - if (defer == null ) + // When isDone this .process() is called and all CommandStores run apply again; so safe to create a new one + if (defer == null || defer.isDone) defer = new Defer(DefinitionOnly, Committed.minKnown, Commit. this ); defer.add(safeStore, safeCommand, safeStore.commandStore()); return ReadNack.NotCommitted;
            dcapwell David Capwell added a comment -

            speaking with Blake the patch should be improved, so figure its best to do in this JIRA rather than 18364

            dcapwell David Capwell added a comment - speaking with Blake the patch should be improved, so figure its best to do in this JIRA rather than 18364
            dcapwell David Capwell added a comment -

            +1 from Blake in GH

            dcapwell David Capwell added a comment - +1 from Blake in GH

            People

              dcapwell David Capwell
              dcapwell David Capwell
              David Capwell
              Blake Eggleston
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: