Hello Alexey Serbin, Andrew Wong, I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/15081 to review the following change. 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 all 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, especially those involving the CREATE_OR_OPEN* modes and concurrent deletes. Thankfully none of our use cases (block managers, log segments, and log index chunks) do that. Change-Id: Ie167302ef85b8e1a40fbb89a7742e2cbb43bcec3 --- 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, 240 insertions(+), 86 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/81/15081/1 -- 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: newchange Gerrit-Change-Id: Ie167302ef85b8e1a40fbb89a7742e2cbb43bcec3 Gerrit-Change-Number: 15081 Gerrit-PatchSet: 1 Gerrit-Owner: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>