Alexey Serbin has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/14472 )
Change subject: [clock] add exponential backoff in HybridClock::Init()
......................................................................
[clock] add exponential backoff in HybridClock::Init()
This patch introduces exponential back-off when polling the
synchronisation status of the underlying time service (i.e. calling
TimeService::WalltimeWithError()) during HybridClock::Init(). Now,
the polling interval starts with 1 millisecond and exponentially grows
up to 1 second.
Prior to this patch, the polling interval was one second, and in case
if time source synchronized faster than in one second,
HybridClock::Init() would incur extra latency (e.g., in case of tests
running with the built-in NTP client synchronized against MiniChronyd).
I verified that with the new approach ExternalMiniCluster-based tests
run faster:
before
[ OK ] AllTypesItest/9.TestTimestampPadding (6794 ms)
after
[ OK ] AllTypesItest/9.TestTimestampPadding (2730 ms)
Change-Id: I75924f1fdcf6a32684cda29bbfa959b00172b50e
Reviewed-on: http://gerrit.cloudera.org:8080/14472
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/clock/hybrid_clock.cc
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/14472
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I75924f1fdcf6a32684cda29bbfa959b00172b50e
Gerrit-Change-Number: 14472
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)