You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jieshan Bean (JIRA)" <ji...@apache.org> on 2011/08/27 06:23:29 UTC

[jira] [Updated] (HBASE-4252) TestLogRolling's low-probability failure

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

Jieshan Bean updated HBASE-4252:
--------------------------------

    Attachment: HBASE-4252-trunk.patch
                HBASE-4252-branch.patch

The key point of how to solve the problem is to insure the last "rollWriter" can be executed.
So changed "log.rollWriter()" to "log.rollWriter(true)".

> TestLogRolling's low-probability failure 
> -----------------------------------------
>
>                 Key: HBASE-4252
>                 URL: https://issues.apache.org/jira/browse/HBASE-4252
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Jieshan Bean
>            Assignee: Jieshan Bean
>             Fix For: 0.90.5
>
>         Attachments: HBASE-4252-branch.patch, HBASE-4252-trunk.patch
>
>
> Before I explain why it could happen, I describe how does this test(testLogRollOnDatanodeDeath) works:
> 1. There's two datanodes A & B in env. So the log has two replications first which is the expect and default value.
> 2. Add a new datanode C and wait it active.
> 3. Kill A who is in the pipelines. 
> 4. Write data. So trigger a new rollWriter while the next sync. And it only happens once. For the new log has two replications.
> 5. Kill another datanode B.
> 6. Write batch data to trigger consecutive rollWriter. So LowReplication-Roller will be disabled.
> 7. Add a new datanode D and wait it active.
> 8. Send a rollWriter request. So expect the new log will has the default replications.
> 9. Write batch data. Assert the LogReplication-Roller will be enabled.
> Maybe the rollWriter request in step 8 can't be executed affected by the previous roll requests from step 6. So the current log replication is not the expect value.
> {noformat}
>   public byte [][] rollWriter() throws FailedLogCloseException, IOException {
>     // Return if nothing to flush.
>     if (this.writer != null && this.numEntries.get() <= 0) {
>       return null;
>     }
> {noformat}
> So the following assertion must be safeguarded.
> {noformat}
>   log.rollWriter();
>   batchWriteAndWait(table, 14, true, 10000);
>   assertTrue("LowReplication Roller should've been enabled",
>       log.isLowReplicationRollEnabled());
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira