Alexey Serbin has submitted this change and it was merged. (
http://gerrit.cloudera.org:8080/15161 )
Change subject: [clock] introduce time source auto selection
......................................................................
[clock] introduce time source auto selection
This patch introduces a new pseudo time source named 'auto'. When
the --time_source flag is set to 'auto', Kudu masters and tablet
servers automatically select the most appropriate time source for
the hybrid clock (see below for the rationale behind the choice).
Below are the rules for the time source auto-selection:
* AWS and GCE cloud environments: the 'builtin' time source is
used (i.e. the hybrid clock uses the built-in NTP client) and
the built-in NTP client is configured to use the dedicated NTP
server provided by the environment
* Azure cloud environments, not-yet-supported cloud environments,
and non-cloud machines: the 'system' time source is used
(i.e. the hybrid clock uses NTP-synchronized local clock)
* macOS machines:
** High Sierra 10.13 and newer: 'system'
** releases prior to High Sierra: 'system_unsync'
As for the rationale behind auto-selecting this or another time source:
* when NTP servers are not known beforehand or their high availability
is not guaranteed, relying on the local NTP-synchronized clock is
the only rational choice (and it's backward-compatible)
* when it's guaranteed to have a set of highly available NTP servers,
using the built-in NTP client is the best choice because it removes
the requirement to configure and maintain NTP server at the machine
NOTE: this patch essentially removes the functionality introduced in
69cf2065805163799d85dc38b812eb73388d3a02 (i.e. auto-configuration
of the built-in NTP client), so now automatic configuration of the
built-in NTP client is not available outside of the
--time_source=auto context.
Change-Id: If9f2bc94f4a1ad32fe365d4f6f0707913fb476a4
Reviewed-on: http://gerrit.cloudera.org:8080/15161
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/clock/builtin_ntp.cc
M src/kudu/clock/hybrid_clock-test.cc
M src/kudu/clock/hybrid_clock.cc
M src/kudu/clock/hybrid_clock.h
M src/kudu/mini-cluster/external_mini_cluster-test.cc
5 files changed, 271 insertions(+), 126 deletions(-)
Approvals:
Kudu Jenkins: Verified
Adar Dembo: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/15161
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If9f2bc94f4a1ad32fe365d4f6f0707913fb476a4
Gerrit-Change-Number: 15161
Gerrit-PatchSet: 12
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Greg Solovyev <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Volodymyr Verovkin <[email protected]>