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

Shengzhe Yao updated HBASE-11139:
---------------------------------

    Attachment: HBASE-11139-v4.patch

>>> just one more question, do you think that we need an 
>>> executor.awaitTermination() after shutdown()?

Good point, we should let executor wait for some time after shutdown in case 
there is an implementation error that causes poll(timeout) never return. 
Although we've set timeout for this test case, adding 
executor.awaitTermination() makes our test purpose more explicit.

> BoundedPriorityBlockingQueue#poll() should check the return value from 
> awaitNanos()
> -----------------------------------------------------------------------------------
>
>                 Key: HBASE-11139
>                 URL: https://issues.apache.org/jira/browse/HBASE-11139
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.99.0
>            Reporter: Ted Yu
>            Assignee: Shengzhe Yao
>            Priority: Minor
>              Labels: noob
>         Attachments: HBASE-11139-v1.patch, HBASE-11139-v2.patch, 
> HBASE-11139-v3.patch, HBASE-11139-v4.patch
>
>
> nanos represents the timeout value.
> {code}
>       while (queue.size() == 0 && nanos > 0) {
>         notEmpty.awaitNanos(nanos);
>       }
> {code}
> The return value from awaitNanos() should be checked - otherwise we may wait 
> for period longer than the timeout value.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to