Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15256 )

Change subject: [test] Fix ASAN failure when Hive Metastore connections are 
retried.
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15256/1/src/kudu/thrift/client.h
File src/kudu/thrift/client.h:

http://gerrit.cloudera.org:8080/#/c/15256/1/src/kudu/thrift/client.h@260
PS1, Line 260: consecutive_reconnect_failures_
> I think the 10s capped is still a functional expectation.
It's absolutely thrilling that we have so many different implementations of 
exponential backoff. Here's one from src/kudu/rpc/rpc.cc:

  MonoDelta ComputeExponentialBackoff(int num_attempts) {
    return MonoDelta::FromMilliseconds(
        (10 + rand() % 10) * static_cast<int>(
            std::pow(2.0, std::min(8, num_attempts - 1))));
  }

Agreed with Alexey that left-shifting by what is effectively an unbounded 
amount feels wrong, so maybe just expressing this differently would be better. 
It's not a hot path.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1282ad36027b314d090e5a2dffdc3854002af761
Gerrit-Change-Number: 15256
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 20 Feb 2020 20:20:51 +0000
Gerrit-HasComments: Yes

Reply via email to