From 64ae6e9eb94228c11498edd8756b5f439338ff8b Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Fri, 28 Mar 2014 15:04:11 -0700 Subject: [PATCH] Don't preallocate log files --- util/env_posix.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/env_posix.cc b/util/env_posix.cc index 237038fcb..da65d7374 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -1363,7 +1363,10 @@ class PosixEnv : public Env { EnvOptions OptimizeForLogWrite(const EnvOptions& env_options) const { EnvOptions optimized = env_options; optimized.use_mmap_writes = false; - optimized.fallocate_with_keep_size = false; + // TODO(icanadi) it's faster if fallocate_with_keep_size is false, but it + // breaks TransactionLogIteratorStallAtLastRecord unit test. Fix the unit + // test and make this false + optimized.fallocate_with_keep_size = true; return optimized; }