hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-7602) TestFromClientSide.testPoolBehavior is incorrect
Date Thu, 17 Jan 2013 06:52:14 GMT

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

Lars Hofhansl updated HBASE-7602:

    Attachment: 7602-0.96.txt

And the 0.96 version.
Like the 0.94 version, this gets rid of the noop joins and using Thread where just Runnable
is needed.
> TestFromClientSide.testPoolBehavior is incorrect
> ------------------------------------------------
>                 Key: HBASE-7602
>                 URL: https://issues.apache.org/jira/browse/HBASE-7602
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.5
>         Attachments: 7602-0.94.txt, 7602-0.96.txt
> The writer of this test misunderstood ThreadPoolExecutor.
> The test adds Threads as tasks to a ThreadPoolExecutor and then calls join on the Thread
objects. But these are not the running threads, it work by pure accident, because Thread happens
to implement Runnable.
> {code}
> pool.submit(threads.get(0));
> ...
> threads.get(0).join();
> {code}
> The join will always return immediately, because the thread never ran.
> This should instead synchronize on the Future returned from submit instead, otherwise
there is no guarantee that the threads in the pool actually finished.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message