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

Heng Chen commented on HBASE-16611:
-----------------------------------

Found the reason.

In the testcase,  we pend the primay call and pass the replica call,  but we 
remove all the callable in SingleServerRequestRunnable.run finally scope, see
{code}
          if (callsInProgress != null && callable != null) {
            callsInProgress.remove(callable);
          }
{code}
When we cancel the primary request,   the response will be null,  and if 
callsInProgress.remove happens before we check the callsInProgress, the 
testcase will failed.  

As the original test case logical, we should not remove the callable in 
callsInProgress if we cancel the request.  I think it is reasonable, because 
the call is really in progress, we just cancel it at client by ourself.




> Flakey org.apache.hadoop.hbase.client.TestReplicasClient.testCancelOfMultiGet
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-16611
>                 URL: https://issues.apache.org/jira/browse/HBASE-16611
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Heng Chen
>
> see 
> https://builds.apache.org/job/PreCommit-HBASE-Build/3494/artifact/patchprocess/patch-unit-hbase-server.txt
> {code}
> testCancelOfMultiGet(org.apache.hadoop.hbase.client.TestReplicasClient)  Time 
> elapsed: 4.026 sec  <<< FAILURE!
> java.lang.AssertionError: null
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.hadoop.hbase.client.TestReplicasClient.testCancelOfMultiGet(TestReplicasClient.java:579)
> Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 94.401 sec - 
> in org.apache.hadoop.hbase.client.TestAdmin2
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.861 sec - 
> in org.apache.hadoop.hbase.client.TestClientScannerRPCTimeout
> Running 
> org.apache.hadoop.hbase.client.TestRestoreSnapshotFromClientWithRegionReplicas
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 261.925 sec 
> <<< FAILURE! - in org.apache.hadoop.hbase.client.TestReplicasClient
> testCancelOfMultiGet(org.apache.hadoop.hbase.client.TestReplicasClient)  Time 
> elapsed: 4.522 sec  <<< FAILURE!
> java.lang.AssertionError: null
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.hadoop.hbase.client.TestReplicasClient.testCancelOfMultiGet(TestReplicasClient.java:581)
> Running org.apache.hadoop.hbase.client.TestFastFail
> Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 3.648 sec - 
> in org.apache.hadoop.hbase.client.TestFastFail
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 277.894 sec 
> <<< FAILURE! - in org.apache.hadoop.hbase.client.TestReplicasClient
> testCancelOfMultiGet(org.apache.hadoop.hbase.client.TestReplicasClient)  Time 
> elapsed: 5.359 sec  <<< FAILURE!
> java.lang.AssertionError: null
>       at org.junit.Assert.fail(Assert.java:86)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertTrue(Assert.java:52)
>       at 
> org.apache.hadoop.hbase.client.TestReplicasClient.testCancelOfMultiGet(TestReplicasClient.java:579)
> {code}



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

Reply via email to