Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8617 )

Change subject: KUDU-2165 workaround: avoid TSAN warnings on CacheMetrics
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8617/2/src/kudu/util/cache.cc
File src/kudu/util/cache.cc:

http://gerrit.cloudera.org:8080/#/c/8617/2/src/kudu/util/cache.cc@474
PS2, Line 474:     std::lock_guard<MutexType> l(id_mutex_);
> Why not acquire this mutex in all build modes to ensure all thread safe-ope
We need the early return or else we'll end up racing against users of the 
metrics_ variable, and we don't want to add synchronization to every cache 
access.

I suppose we could leave this in all build types and put a CHECK(IsGTest()) or 
something in there to ensure that metrics aren't replaced in non-test 
situations. How does that sound?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifc5c6e9306df78c364c8b89651ddcc56b90a924f
Gerrit-Change-Number: 8617
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Tue, 21 Nov 2017 19:55:52 +0000
Gerrit-HasComments: Yes

Reply via email to