You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Yu Li (JIRA)" <ji...@apache.org> on 2016/05/31 12:53:12 UTC

[jira] [Created] (HBASE-15922) Fix waitForMaximumCurrentTasks logic in AsyncProcess

Yu Li created HBASE-15922:
-----------------------------

             Summary: Fix waitForMaximumCurrentTasks logic in AsyncProcess
                 Key: HBASE-15922
                 URL: https://issues.apache.org/jira/browse/HBASE-15922
             Project: HBase
          Issue Type: Bug
            Reporter: Yu Li


In current implementation of AsyncProcess#waitForMaximumCurrentTasks, we have below codes:
{code}
while ((currentInProgress = this.tasksInProgress.get()) > max) {
      ...
      try {
        synchronized (this.tasksInProgress) {
          if (tasksInProgress.get() != oldInProgress) break;
          this.tasksInProgress.wait(100);
        }
      } catch (InterruptedException e) {
        throw new InterruptedIOException("#" + id + ", interrupted." +
            " currentNumberOfTask=" + currentInProgress);
      }
}
{code}
Which will cause end of while loop if there's any task done inside one loop making {{taskInProgress.get()}} no longer equals to {{oldInProgress}}

This is a regression issue caused by HBASE-11403 and only exists in branch-1/master branch, we could easily see the difference comparing to latest 0.98 code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)