Alexey Serbin has uploaded this change for review. ( 
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
---
M src/kudu/util/high_water_mark.h
1 file changed, 18 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/22629/1
-- 
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: newchange
Gerrit-Change-Id: I17e4d4cf308c06b0dd135a99e793067980d5ad20
Gerrit-Change-Number: 22629
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to