Todd Lipcon has posted comments on this change.

Change subject: java: use truncated randomized exponential backoff for retries
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3184/1/java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java
File java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java:

Line 924:     // Randomized exponential backoff, truncated at 4096ms.
> Why not use the same backoff scheme as the C++ client? I think that's linea
The Java client uses this somewhat indiscriminately including things like 
waiting for a table to be created, etc. Exponential backoff seems like a more 
reasonable strategy than linear.

Looking at the C++ client, there are a number of different strategies sprinkled 
around. For scanners, we use:

    // Exponential backoff with jitter anchored between 10ms and 20ms, and an
    // upper bound between 2.5s and 5s.
    MonoDelta sleep = MonoDelta::FromMilliseconds(
        (10 + rand() % 10) * static_cast<int>(std::pow(2.0, std::min(8, 
scan_attempts_ - 1))));

so this is approximately the same, except starting at 10ms instead of 1ms


-- 
To view, visit http://gerrit.cloudera.org:8080/3184
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I79256e00cf35c072c60cd2b9034e6c1b10c18b38
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to