Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22629 )
Change subject: [util] use std::atomic in HighWaterMark ...................................................................... [util] use std::atomic in HighWaterMark This patch replaces chromium-based Atomics with std::atomic in the implementation of HighWaterMark class. This is a part of the on-going work to replace chromium-derived atomics with STL-based ones. While TryIncrementBy() provides 'a strict limit' semantics as it should, the rest of the read-style methods in HightWaterMark API adhere to using the std::memory_order_relaxed ordering, similar to the original version. That's because all the use cases of such methods involve TOCTOU conditions anyway. With that, it wouldn't be a good idea switching to more strict ordering for read operations (i.e. std::memory_order_acquire for load) and incur a performance hit without a clear benefit in return. Change-Id: I17e4d4cf308c06b0dd135a99e793067980d5ad20 Reviewed-on: http://gerrit.cloudera.org:8080/22629 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> --- M src/kudu/util/high_water_mark.h 1 file changed, 18 insertions(+), 20 deletions(-) Approvals: Alexey Serbin: Verified Abhishek Chennaka: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/22629 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I17e4d4cf308c06b0dd135a99e793067980d5ad20 Gerrit-Change-Number: 22629 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]>
