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

Xiao Chen commented on HDFS-9466:
---------------------------------

Hi [~cmccabe],
Thanks for looking into this patch.
IIUC, the patch is trying to fix the race where the check happens before the 
slot is removed before the failed call (The following is injected to be 
failing). So the expiry should be fine, and the {{waitFor}} is just for testing 
purpose on the check. Wei-Chiu please correct me if I'm wrong.
{code}
    // The second read should fail, and we should only have 1 segment and 1 slot
    // left.
    fs.getClient().getConf().brfFailureInjector =
        new TestCleanupFailureInjector();
    try {
      DFSTestUtil.readFileBuffer(fs, TEST_PATH2);
    } catch (Throwable t) {
      GenericTestUtils.assertExceptionContains("TCP reads were disabled for " +
          "testing, but we failed to do a non-TCP read.", t);
    }
{code}

> TestShortCircuitCache#testDataXceiverCleansUpSlotsOnFailure is flaky
> --------------------------------------------------------------------
>
>                 Key: HDFS-9466
>                 URL: https://issues.apache.org/jira/browse/HDFS-9466
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fs, hdfs-client
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>         Attachments: HDFS-9466.001.patch, HDFS-9466.002.patch
>
>
> This test is flaky and fails quite frequently in trunk.
> Error Message
> expected:<1> but was:<2>
> Stacktrace
> {noformat}
> java.lang.AssertionError: expected:<1> but was:<2>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at org.junit.Assert.assertEquals(Assert.java:555)
>       at org.junit.Assert.assertEquals(Assert.java:542)
>       at 
> org.apache.hadoop.hdfs.shortcircuit.TestShortCircuitCache$17.accept(TestShortCircuitCache.java:636)
>       at 
> org.apache.hadoop.hdfs.server.datanode.ShortCircuitRegistry.visit(ShortCircuitRegistry.java:395)
>       at 
> org.apache.hadoop.hdfs.shortcircuit.TestShortCircuitCache.checkNumberOfSegmentsAndSlots(TestShortCircuitCache.java:631)
>       at 
> org.apache.hadoop.hdfs.shortcircuit.TestShortCircuitCache.testDataXceiverCleansUpSlotsOnFailure(TestShortCircuitCache.java:684)
> {noformat}
> Thanks to [~xiaochen] for identifying the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to