You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2023/01/28 18:58:38 UTC

[kudu-CR] [clock] detect unsynchronized clock earlier

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19449


Change subject: [clock] detect unsynchronized clock earlier
......................................................................

[clock] detect unsynchronized clock earlier

This patch adds an extra check for the return code of the ntp_adjtime()
call in SystemNtp::Init().  This is to allow for earlier detection of
unsynchronized local clock conditions if using the "system" time source.
Before this patch, if the local clock wasn't synchronized with NTP, that
fact would be detected later upon first call to WalltimeWithError().
The latter usually happens when a Kudu server tries to find current time
to generate a hybrid timestamp for an operation.

This is a follow-up to e72208436a625391739217394c67d783e992367a.

Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
---
M src/kudu/clock/system_ntp.cc
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/49/19449/1
-- 
To view, visit http://gerrit.cloudera.org:8080/19449
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>

[kudu-CR] [clock] detect unsynchronized clock earlier

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

Change subject: [clock] detect unsynchronized clock earlier
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/19449
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>

[kudu-CR] [clock] detect unsynchronized clock earlier

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/19449 )

Change subject: [clock] detect unsynchronized clock earlier
......................................................................


Patch Set 1: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>
Gerrit-Comment-Date: Sun, 29 Jan 2023 02:24:00 +0000
Gerrit-HasComments: No

[kudu-CR] [clock] detect unsynchronized clock earlier

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19449 )

Change subject: [clock] detect unsynchronized clock earlier
......................................................................

[clock] detect unsynchronized clock earlier

This patch adds an extra check for the return code of the ntp_adjtime()
call in SystemNtp::Init().  This is to allow for earlier detection of
unsynchronized local clock conditions if using the "system" time source.
Before this patch, if the local clock wasn't synchronized with NTP, that
fact would be detected later upon first call to WalltimeWithError().
The latter usually happens when a Kudu server tries to find current time
to generate a hybrid timestamp for an operation.

This is a follow-up to e72208436a625391739217394c67d783e992367a.

Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Reviewed-on: http://gerrit.cloudera.org:8080/19449
Reviewed-by: Yifan Zhang <ch...@163.com>
Reviewed-by: Yingchun Lai <ac...@gmail.com>
Tested-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/clock/system_ntp.cc
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Yifan Zhang: Looks good to me, approved
  Yingchun Lai: Looks good to me, approved
  Alexey Serbin: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>

[kudu-CR] [clock] detect unsynchronized clock earlier

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/19449 )

Change subject: [clock] detect unsynchronized clock earlier
......................................................................


Patch Set 1: Verified+1

unrelated test failure in RaftConsensusITest.TestSlowFollower (RELEASE)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <ac...@gmail.com>
Gerrit-Comment-Date: Sun, 29 Jan 2023 05:02:29 +0000
Gerrit-HasComments: No

[kudu-CR] [clock] detect unsynchronized clock earlier

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/19449 )

Change subject: [clock] detect unsynchronized clock earlier
......................................................................


Patch Set 1: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32fd6ac1adfa04251e1e4b6237d650071e3b4dc9
Gerrit-Change-Number: 19449
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Sun, 29 Jan 2023 01:40:22 +0000
Gerrit-HasComments: No