Alexey Serbin has uploaded this change for review. ( 
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
---
M src/kudu/clock/hybrid_clock.cc
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/72/14472/1
--
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: newchange
Gerrit-Change-Id: I75924f1fdcf6a32684cda29bbfa959b00172b50e
Gerrit-Change-Number: 14472
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to