Details

    • Type: Sub-task
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_RELEASE_1_5_2
    • Component/s: None
    • Labels:
      None

      Description

      BLZG-181 added critical section protection to AbstractJournal.abort(). If there is a failed abort, the store will refuse to go through a commit. This ticket is to extend this protection by also refusing to allow any mutation (write, delete) on the store until the store goes through a successful abort. This should provide further protection against errors such as BLZG-1236 which occur when allocators associated with failed write sets somehow make it onto set of deferred frees for the recycler.

      Note: We might also need to refuse the create of a new allocation context when abort() needs to be invoked. This could be checked from AbstractTask.IsolatedActionJournal<init>()

        Issue Links

          Activity

          Hide
          bryanthompson bryanthompson added a comment -

          Code change is to AbstractJournal.assertCanWrite(). In addition, I have defined a new except that is specific to the abort critical section protection. This exception extends the IllegalStateException that was previously thrown.

          
              protected void assertCanWrite() {
          
                  if (_bufferStrategy == null) {
                      // only possible during the constructor call.
                      throw new IllegalStateException();
                  }
          
                  if (!_bufferStrategy.isOpen()) {
                      throw new IllegalStateException();
                  }
          
                  if (_bufferStrategy.isReadOnly()) {
                      throw new IllegalStateException();
                  }
          
                  if (abortRequired.get()) {
                      /**
                       * Do not permit mutation if an abort must be performed.
                       * 
                       * @see http://jira.blazegraph.com/browse/BLZG-181 (Add critical
                       *      section protection to AbstractJournal.abort() and
                       *      BigdataSailConnection.rollback())
                       * @see http://jira.blazegraph.com/browse/BLZG-1236 (Recycler error
                       *      in 1.5.1)
                       */
                      throw new AbortRequiredException();
                  }
                  
              }
          
          Show
          bryanthompson bryanthompson added a comment - Code change is to AbstractJournal.assertCanWrite(). In addition, I have defined a new except that is specific to the abort critical section protection. This exception extends the IllegalStateException that was previously thrown. protected void assertCanWrite() { if (_bufferStrategy == null ) { // only possible during the constructor call. throw new IllegalStateException(); } if (!_bufferStrategy.isOpen()) { throw new IllegalStateException(); } if (_bufferStrategy.isReadOnly()) { throw new IllegalStateException(); } if (abortRequired.get()) { /** * Do not permit mutation if an abort must be performed. * * @see http: //jira.blazegraph.com/browse/BLZG-181 (Add critical * section protection to AbstractJournal.abort() and * BigdataSailConnection.rollback()) * @see http: //jira.blazegraph.com/browse/BLZG-1236 (Recycler error * in 1.5.1) */ throw new AbortRequiredException(); } }
          Hide
          bryanthompson bryanthompson added a comment -

          Added protection in AbstractJournal. If an abort fails, the journal will no longer permit writes until abort() is invoked successfully. Previously the journal would still accept writes but would refuse to commit.

          This change passes the Journal and RWJournal test suites.

          Commit 216d73e0755b41a57108ffc4e71c9c2169857157 to github master for CI.

          Show
          bryanthompson bryanthompson added a comment - Added protection in AbstractJournal. If an abort fails, the journal will no longer permit writes until abort() is invoked successfully. Previously the journal would still accept writes but would refuse to commit. This change passes the Journal and RWJournal test suites. Commit 216d73e0755b41a57108ffc4e71c9c2169857157 to github master for CI.

            People

            • Assignee:
              bryanthompson bryanthompson
              Reporter:
              bryanthompson bryanthompson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: