hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14521) Unify the semantic of hbase.client.retries.number
Date Thu, 15 Oct 2015 11:28:05 GMT

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

Hudson commented on HBASE-14521:
--------------------------------

SUCCESS: Integrated in HBase-TRUNK #6915 (See [https://builds.apache.org/job/HBase-TRUNK/6915/])
HBASE-14521 Unify the semantic of hbase.client.retries.number (Yu Li) (nkeywal: rev e7defd7d9a76f44e3089db3fe522fe400fe6dcd7)
* hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedException.java
* hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
* hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableMultiplexer.java
* hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
* hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
* hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
* hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
* hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
* hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java


> Unify the semantic of hbase.client.retries.number
> -------------------------------------------------
>
>                 Key: HBASE-14521
>                 URL: https://issues.apache.org/jira/browse/HBASE-14521
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.14, 1.1.2
>            Reporter: Yu Li
>            Assignee: Yu Li
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14521.patch, HBASE-14521_v2.patch, HBASE-14521_v3.patch
>
>
> From name of the _hbase.client.retries.number_ property, it should be the number of maximum
*retries*, or say if we set the property to 1, there should be 2 attempts in total. However,
there're two different semantics when using it in current code base.
> For example, in ConnectionImplementation#locateRegionInMeta:
> {code}
>     int localNumRetries = (retry ? numTries : 1);
>     for (int tries = 0; true; tries++) {
>       if (tries >= localNumRetries) {
>         throw new NoServerForRegionException("Unable to find region for "
>             + Bytes.toStringBinary(row) + " in " + tableName +
>             " after " + numTries + " tries.");
>       }
> {code}
> the retries number is regarded as max times for *tries*
> While in RpcRetryingCallerImpl#callWithRetries:
> {code}
>     for (int tries = 0;; tries++) {
>       long expectedSleep;
>       try {
>         callable.prepare(tries != 0); // if called with false, check table status on
ZK
>         interceptor.intercept(context.prepare(callable, tries));
>         return callable.call(getRemainingTime(callTimeout));
>       } catch (PreemptiveFastFailException e) {
>         throw e;
>       } catch (Throwable t) {
>         ...
>         if (tries >= retries - 1) {
>           throw new RetriesExhaustedException(tries, exceptions);
>         }
> {code}
> it's regarded as exactly for *REtry* (try a call first with no condition and then check
whether to retry or exceeds maximum retry number)
> This inconsistency will cause misunderstanding in usage, such as one of our customer
set the property to zero expecting one single call but finally received NoServerForRegionException.
> We should unify the semantic of the property, and I suggest to keep the original one
for retry rather than total tries.



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

Mime
View raw message