Hello Dan Burkert, Mike Percy,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/5457
to review the following change.
Change subject: env: do not convert all Flush() calls into fsync() on macOS
......................................................................
env: do not convert all Flush() calls into fsync() on macOS
On Linux, we don't expect sync_file_range() to actually provide durability;
we use it to tell the kernel to start writing back dirty pages while we go
off and do other work. That is, it must be followed up with an fsync() if
durability is actually desired.
To that end, let's only convert Flush() to fsync() if a synchronous flush
was requested. Even then I'm not sure it makes sense (sync_file_range()
explicitly does NOT guarantee durability, even if SYNC_FILE_RANGE_WAIT_AFTER
was used), but at least callers will get the "only return when all dirty
pages have been written out" behavior they probably wanted.
Change-Id: I01bdd8dbaaad0205c0795a87dd973c8bf0fb87dc
---
M src/kudu/util/env_posix.cc
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/57/5457/1
--
To view, visit http://gerrit.cloudera.org:8080/5457
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I01bdd8dbaaad0205c0795a87dd973c8bf0fb87dc
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Mike Percy <[email protected]>