Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15081 )
Change subject: file cache: support alternate open modes ...................................................................... file cache: support alternate open modes Previously, the file cache only supported opening existing files; any new file creation happened out-of-band and then the file reopened via the cache. If we're going to use the file cache for log index chunks, however, we need to support CREATE_OR_OPEN style usage, and doing it in the log index itself is somewhat hairy. This patch modifies the file cache to support most of the modes defined in Env::OpenMode. I tried to ensure that cache operations look and feel like a standard POSIX filesystem, but it's tough to get this right, and I'm sure I missed some corner cases. I feel pretty good about our use cases (block managers, log segments, and log index chunks) though. Change-Id: Ie167302ef85b8e1a40fbb89a7742e2cbb43bcec3 Reviewed-on: http://gerrit.cloudera.org:8080/15081 Tested-by: Kudu Jenkins Reviewed-by: Andrew Wong <[email protected]> --- M src/kudu/fs/file_block_manager.cc M src/kudu/fs/log_block_manager.cc M src/kudu/util/file_cache-stress-test.cc M src/kudu/util/file_cache-test.cc M src/kudu/util/file_cache.cc M src/kudu/util/file_cache.h 6 files changed, 266 insertions(+), 109 deletions(-) Approvals: Kudu Jenkins: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/15081 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie167302ef85b8e1a40fbb89a7742e2cbb43bcec3 Gerrit-Change-Number: 15081 Gerrit-PatchSet: 4 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
