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

AsyncMetaTableAccessor may hang when call ScanController.terminate many times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • None
    • None

    Description

      Code in ScanControllerImpl.

          private void preCheck() {
            Preconditions.checkState(Thread.currentThread() == callerThread,
              "The current thread is %s, expected thread is %s, " +
                  "you should not call this method outside onNext or onHeartbeat",
              Thread.currentThread(), callerThread);
            Preconditions.checkState(state.equals(ScanControllerState.INITIALIZED),
              "Invalid Stopper state %s", state);
          }
      
          @Override
          public void terminate() {
            preCheck();
            state = ScanControllerState.TERMINATED;
          }
      

      So if call terminate on a already terminated scan, it will throw IllegalStateException.

      Attachments

        1. HBASE-19337.master.001.patch
          2 kB
          Guanghao Zhang

        Activity

          People

            zghao Guanghao Zhang
            zghao Guanghao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: