You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Nicolas Liochon (JIRA)" <ji...@apache.org> on 2013/04/08 15:35:15 UTC

[jira] [Created] (HBASE-8290) TestHTableMultiplexer is flaky

Nicolas Liochon created HBASE-8290:
--------------------------------------

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


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