[ 
https://issues.apache.org/jira/browse/HBASE-15922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yu Li updated HBASE-15922:
--------------------------
             Assignee: Yu Li
    Affects Version/s: 2.0.0
                       1.2.1
                       1.1.4

> Fix waitForMaximumCurrentTasks logic in AsyncProcess
> ----------------------------------------------------
>
>                 Key: HBASE-15922
>                 URL: https://issues.apache.org/jira/browse/HBASE-15922
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 1.2.1, 1.1.4
>            Reporter: Yu Li
>            Assignee: 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)

Reply via email to