[ 
https://issues.apache.org/jira/browse/HBASE-8290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625457#comment-13625457
 ] 

Nicolas Liochon commented on HBASE-8290:
----------------------------------------

When I read the comments in the code, I understand that we're supposed to keep 
the HTableMultiplexerStatus. This said the code does not behave correctly, so 
all there are a lot of possible guesses.

I think the patch I proposed is ok, even if others are acceptable as well. So I 
will commit it if nobody objects.

                
> TestHTableMultiplexer is flaky
> ------------------------------
>
>                 Key: HBASE-8290
>                 URL: https://issues.apache.org/jira/browse/HBASE-8290
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.95.0
>            Reporter: Nicolas Liochon
>            Assignee: Nicolas Liochon
>             Fix For: 0.95.1
>
>         Attachments: 8290.v1.patch
>
>
> I reproduce it all the time if I comment the sleep here:
> {code}
>   private void verifyAllBufferedPutsHaveFlushed(HTableMultiplexerStatus 
> status) {
>     int retries = 8;
>     int tries = 0;
>     do {         /*
>       try {
>         Thread.sleep(2 * TEST_UTIL.getConfiguration().getLong(
>           HTableMultiplexer.TABLE_MULTIPLEXER_FLUSH_FREQ_MS, 100));
>         tries++;
>       } catch (InterruptedException e) {
>         Thread.currentThread().interrupt();
>       }         */
>     } while (status.getTotalBufferedCounter() != 0 && tries != retries);
>     assertEquals("There are still some buffered puts left in the queue",
>         0, status.getTotalBufferedCounter());
>   }
> {code}
> Given that getTotalBufferedCounter is never decremented, there is a 
> misunderstanding somewhere. As well, reading plain values without a volatile 
> or a synchronized in a MT context is likely to be wrong.

--
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

Reply via email to