Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20981

Rollback stateCount accounting thrown-off when exception out of rollbackState

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 3.0.0-alpha-1, 2.1.1, 2.0.2
    • amv2
    • None
    • Reviewed

    Description

      Found by might allan163 over in HBASE-20893. Quoting Allan:

      But, there is truly a bug here,
      
        @Override
        protected void rollback(final TEnvironment env)
            throws IOException, InterruptedException {
          if (isEofState()) stateCount--;
          try {
            updateTimestamp();
            rollbackState(env, getCurrentState());
            stateCount--;
          } finally {
            updateTimestamp();
          }
        }
      We need to decrease the stateCount when rolling back, so we can rollback for the previous state correctly. But. since a exception is thrown, the decrease for stateCount never happen. So ProcedureExecutor will continue to rollback for only one state(the one throw a exception) until the end of the execution stack.
      

      Attachments

        1. HBASE-20981.branch-2.001.patch
          5 kB
          Jack Bearden
        2. HBASE-20981.002.patch
          6 kB
          Jack Bearden

        Issue Links

          Activity

            People

              jackbearden Jack Bearden
              stack Michael Stack
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: