Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15216 )

Change subject: [clock] cleanup on accessing HybridClock::next_timestamp_
......................................................................


Patch Set 2: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/15216/2/src/kudu/clock/hybrid_clock.h
File src/kudu/clock/hybrid_clock.h:

http://gerrit.cloudera.org:8080/#/c/15216/2/src/kudu/clock/hybrid_clock.h@174
PS2, Line 174:   void NowWithErrorUnlocked(Timestamp* timestamp, uint64_t* 
max_error_usec);
Maybe doc? At least something like "Variant of NowWithError that should already 
hold 'lock_'.


http://gerrit.cloudera.org:8080/#/c/15216/2/src/kudu/clock/hybrid_clock.cc
File src/kudu/clock/hybrid_clock.cc:

http://gerrit.cloudera.org:8080/#/c/15216/2/src/kudu/clock/hybrid_clock.cc@222
PS2, Line 222:     std::lock_guard<decltype(lock_)> lock(lock_);
FWIW, we typically don't expect other threads to access an object until _after_ 
its Init() is called, so I don't think this lock acquisition is strictly 
necessary.

It doesn't hurt to leave it in, though.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I251c538c65bfc75a882218c2d946c795e69bcbbe
Gerrit-Change-Number: 15216
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <[email protected]>
Gerrit-Comment-Date: Fri, 14 Feb 2020 01:44:31 +0000
Gerrit-HasComments: Yes

Reply via email to