Dan Burkert has submitted this change and it was merged.

Change subject: KUDU-2102: fix PosixRWFile::Sync to guarantee durability when 
used concurrently
......................................................................


KUDU-2102: fix PosixRWFile::Sync to guarantee durability when
used concurrently

PosixRWFile has an AtomicBool to optimize the perfomance of Sync()
so that when two threads call Sync() at the same time, only one will
actually do the fsync(). However, the optimization may result in one
thread returning from the call early and operating under the assumption
that the file's data has been made durable, even though it is still in
the process of being synchronized to disk.

This patch fixes this issue simply by removing the optimization. Since
the overhead of no-op fsync() is purely syscall-related, this optimization
wasn't meaningful to begin with.

Change-Id: Ifaf2686233b2553de6d4a4c76fa67cc48dd340d4
Reviewed-on: http://gerrit.cloudera.org:8080/7835
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Adar Dembo <[email protected]>
---
M src/kudu/util/env_posix.cc
1 file changed, 0 insertions(+), 8 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved; Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifaf2686233b2553de6d4a4c76fa67cc48dd340d4
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>

Reply via email to