Hello Kudu Jenkins, Adar Dembo, Volodymyr Verovkin,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/15156
to look at the new patch set (#4).
Change subject: [clock] simplify system time source
......................................................................
[clock] simplify system time source
This changelist updates the SystemNtp time provider to use ntp_gettime()
instead of ntp_adjtime() to retrieve current wall-clock time
(both functions are from the NTP kernel API, see [1] for details).
As it turned out, the 'tolerance' field from timex structure is
architecture-dependent constant and never changes: I verified that
for Linux and FreeBSD kernels. So, it's possible to call ntp_adjtime()
in Init() and then use the retrieved value to calculate the clock's
skew upper bound just once.
In addition, this patch enables the 'system' time source for macOS
HighSierra and newer, where the NTP kernel API is supported.
[1] http://man7.org/linux/man-pages/man3/ntp_gettime.3.html
Change-Id: Ib197effb63e8f5e37fd828c88e705112bb7047ce
---
M src/kudu/clock/CMakeLists.txt
M src/kudu/clock/hybrid_clock.cc
M src/kudu/clock/system_ntp.cc
M src/kudu/clock/system_ntp.h
4 files changed, 62 insertions(+), 50 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/56/15156/4
--
To view, visit http://gerrit.cloudera.org:8080/15156
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib197effb63e8f5e37fd828c88e705112bb7047ce
Gerrit-Change-Number: 15156
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <[email protected]>