Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/11190 )
Change subject: file_cache: stop using sync_on_close when reopening evicted files ...................................................................... file_cache: stop using sync_on_close when reopening evicted files When the FileCache was originally written, PosixRWFile had a pending_sync_ member which tracked whether or not a file was dirty and needed to be synced. However, with its removal in commit 9a07b2fed, sync_on_close=true should no longer be necessary for correctness. I only noticed this because of a "Time spent sync" log message emitted while running 'kudu fs dump', which was perplexing seeing as this CLI invocation is read-only. An unnecessary fdatasync system call should no-op, but maybe that's not the case on older kernels? While I was there, I cleaned up env_posix.cc a bit, including constifying an fd_ member and replacing its "is the file closed?" semantic with a new dedicated boolean. Change-Id: I845f39ea202ec0cb46ce8e841c6cfb6c3a8dad2c Reviewed-on: http://gerrit.cloudera.org:8080/11190 Tested-by: Kudu Jenkins Reviewed-by: Todd Lipcon <[email protected]> --- M src/kudu/util/env.h M src/kudu/util/env_posix.cc M src/kudu/util/file_cache.cc 3 files changed, 54 insertions(+), 46 deletions(-) Approvals: Kudu Jenkins: Verified Todd Lipcon: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/11190 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I845f39ea202ec0cb46ce8e841c6cfb6c3a8dad2c Gerrit-Change-Number: 11190 Gerrit-PatchSet: 3 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
