[ https://issues.apache.org/jira/browse/HBASE-15615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282203#comment-15282203 ]
Gary Helmling commented on HBASE-15615: --------------------------------------- The v4 patch looks good. For the tests I mentioned, I was just thinking to create instances of RegionServerCallable and RegionAdminServiceCallable, and check the return values of the sleep() method for different parameters. The test method {{testCallableSleep()}} looks like it should work as well. But it will be really slow, sleeping for a total of more than 2 minutes. I'd like to avoid adding more slow tests to our test suite, especially if it's not necessary. Instead of using the full stack test with the coprocessor, could you instead just do something like: {code} RegionServerCallable<Object> testCallable = new RegionServerCallable<Object>(TEST_UTIL.getConnection(), tableName, row) { public Object call(int timeout) throws IOException { return null; } }; for (int i = 0; i < HConstants.RETRY_BACKOFF.length; i++) { assertEquals(30 * HConstants.RETRY_BACKOFF[i], testCallable.sleep(30, i)); } {code} Or something along those lines. Then you're not actually doing any sleeping and the test should be quick. Does that fail to capture any other aspect of the fix? > Wrong sleep time when RegionServerCallable need retry > ----------------------------------------------------- > > Key: HBASE-15615 > URL: https://issues.apache.org/jira/browse/HBASE-15615 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 1.0.0, 2.0.0, 1.1.0, 1.2.0, 1.3.0, 0.98.19 > Reporter: Guanghao Zhang > Assignee: Guanghao Zhang > Fix For: 1.3.0 > > Attachments: HBASE-15615-branch-0.98.patch, > HBASE-15615-branch-1.0-v2.patch, HBASE-15615-branch-1.1-v2.patch, > HBASE-15615-branch-1.1-v2.patch, HBASE-15615-branch-1.patch, > HBASE-15615-v1.patch, HBASE-15615-v1.patch, HBASE-15615-v2.patch, > HBASE-15615-v2.patch, HBASE-15615-v3.patch, HBASE-15615-v4.patch, > HBASE-15615.patch > > > In RpcRetryingCallerImpl, it get pause time by expectedSleep = > callable.sleep(pause, tries + 1); And in RegionServerCallable, it get pasue > time by sleep = ConnectionUtils.getPauseTime(pause, tries + 1). So tries will > be bumped up twice. And the pasue time is 3 * hbase.client.pause when tries > is 0. > RETRY_BACKOFF = {1, 2, 3, 5, 10, 20, 40, 100, 100, 100, 100, 200, 200} -- This message was sent by Atlassian JIRA (v6.3.4#6332)