Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15082 )
Change subject: log: start using file cache ...................................................................... log: start using file cache This patch modifies the log to use the file cache. New WAL segments are opened through the cache from the moment we switch to them, meaning there's a short period of time as they're being preallocated where they're opened outside the cache. Log index chunks are only used through the cache. The bulk of the patch is plumbing to get the file cache down from the server into the various log classes. Most "interesting" log-related tests have been modified to instantiate a cache while other unit tests have not, ensuring a mix of test coverage. One important semantic change to be aware of: it is now unsafe to delete a log's data or bootstrap a new copy of an existing tablet without first closing the old log. Thankfully we only took advantage of this in tests. I added a new gflag to use as a feature flag, in case things go south. Change-Id: I2c00f6b839a693e059fa2ce79abf347dbf83bdd0 Reviewed-on: http://gerrit.cloudera.org:8080/15082 Tested-by: Adar Dembo <a...@cloudera.com> Reviewed-by: Andrew Wong <aw...@cloudera.com> --- M src/kudu/consensus/consensus_peers-test.cc M src/kudu/consensus/consensus_queue-test.cc M src/kudu/consensus/log-test-base.h M src/kudu/consensus/log-test.cc M src/kudu/consensus/log.cc M src/kudu/consensus/log.h M src/kudu/consensus/log_cache-test.cc M src/kudu/consensus/log_index-test.cc M src/kudu/consensus/log_index.cc M src/kudu/consensus/log_index.h M src/kudu/consensus/log_reader.cc M src/kudu/consensus/log_reader.h M src/kudu/consensus/log_util.cc M src/kudu/consensus/log_util.h M src/kudu/consensus/mt-log-test.cc M src/kudu/consensus/raft_consensus_quorum-test.cc M src/kudu/integration-tests/log_verifier.cc M src/kudu/integration-tests/timestamp_advancement-itest.cc M src/kudu/integration-tests/ts_recovery-itest.cc M src/kudu/master/sys_catalog.cc M src/kudu/tablet/tablet_bootstrap-test.cc M src/kudu/tablet/tablet_bootstrap.cc M src/kudu/tablet/tablet_bootstrap.h M src/kudu/tablet/tablet_replica-test.cc M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_local_replica.cc M src/kudu/tools/tool_action_perf.cc M src/kudu/tools/tool_action_wal.cc M src/kudu/tserver/tablet_copy_source_session-test.cc M src/kudu/tserver/ts_tablet_manager.cc M src/kudu/tserver/ts_tablet_manager.h 31 files changed, 259 insertions(+), 112 deletions(-) Approvals: Adar Dembo: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/15082 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2c00f6b839a693e059fa2ce79abf347dbf83bdd0 Gerrit-Change-Number: 15082 Gerrit-PatchSet: 4 Gerrit-Owner: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>