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

Rollback stateCount accounting thrown-off when exception out of rollbackState

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 3.0.0, 2.1.1, 2.0.2
    • Component/s: amv2
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Found by might Allan Yang 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

              • Assignee:
                jackbearden Jack Bearden
                Reporter:
                stack stack
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: