This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 5b2259a79ca52a6bbbd72386c157d3b37bfec489 Author: Alexey Serbin <[email protected]> AuthorDate: Thu Feb 7 18:45:11 2019 -0800 [clock] fix VLOG() misprint in MockNtp Moved misplaced VLOG() into appropriate place. This changelist does not contain any functional modifications. Change-Id: I5ebd3e97bafa2038779dcf2b14de6a0e08cc4012 Reviewed-on: http://gerrit.cloudera.org:8080/12404 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Alexey Serbin <[email protected]> --- src/kudu/clock/mock_ntp.cc | 7 ++++--- src/kudu/clock/mock_ntp.h | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/kudu/clock/mock_ntp.cc b/src/kudu/clock/mock_ntp.cc index 5d7aa8a..7924ac6 100644 --- a/src/kudu/clock/mock_ntp.cc +++ b/src/kudu/clock/mock_ntp.cc @@ -29,9 +29,8 @@ namespace clock { Status MockNtp::WalltimeWithError(uint64_t* now_usec, uint64_t* error_usec) { std::lock_guard<simple_spinlock> lock(lock_); - VLOG(1) << "Current clock time: " << mock_clock_time_usec_ << " error: " - << mock_clock_max_error_usec_ << ". Updating to time: " << now_usec - << " and error: " << error_usec; + VLOG(1) << "Current clock time: " << mock_clock_time_usec_ + << " error: " << mock_clock_max_error_usec_; *now_usec = mock_clock_time_usec_; *error_usec = mock_clock_max_error_usec_; return Status::OK(); @@ -39,12 +38,14 @@ Status MockNtp::WalltimeWithError(uint64_t* now_usec, uint64_t* error_usec) { void MockNtp::SetMockClockWallTimeForTests(uint64_t now_usec) { std::lock_guard<simple_spinlock> lock(lock_); + VLOG(1) << "Updating to time: " << now_usec; CHECK_GE(now_usec, mock_clock_time_usec_); mock_clock_time_usec_ = now_usec; } void MockNtp::SetMockMaxClockErrorForTests(uint64_t max_error_usec) { std::lock_guard<simple_spinlock> lock(lock_); + VLOG(1) << "Updating to error: " << max_error_usec; mock_clock_max_error_usec_ = max_error_usec; } diff --git a/src/kudu/clock/mock_ntp.h b/src/kudu/clock/mock_ntp.h index 0878c5d..94d4a06 100644 --- a/src/kudu/clock/mock_ntp.h +++ b/src/kudu/clock/mock_ntp.h @@ -34,13 +34,13 @@ class MockNtp : public TimeService { MockNtp() = default; virtual ~MockNtp() = default; - virtual Status Init() override { + Status Init() override { return Status::OK(); } - virtual Status WalltimeWithError(uint64_t* now_usec, uint64_t* error_usec) override; + Status WalltimeWithError(uint64_t* now_usec, uint64_t* error_usec) override; - virtual int64_t skew_ppm() const override { + int64_t skew_ppm() const override { // Just return the same constant as the default configuration for NTP: // the local clock frequency may accumulate error at a max rate of // 500us per second.
