diff options
author | cmumford <cmumford@chromium.org> | 2015-03-26 11:28:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-26 18:29:33 +0000 |
commit | 4050991eae26c33acb1c1996fe1900b43ae0fa13 (patch) | |
tree | 2318f6a135a046efcd83d80613ae4e986824dfb1 /extensions/browser/value_store | |
parent | 695932863ee381ddcb55a61eae9e5f0623df9138 (diff) | |
download | chromium_src-4050991eae26c33acb1c1996fe1900b43ae0fa13.zip chromium_src-4050991eae26c33acb1c1996fe1900b43ae0fa13.tar.gz chromium_src-4050991eae26c33acb1c1996fe1900b43ae0fa13.tar.bz2 |
leveldb: Reuse manifest (AKA logs) during open.
All leveldb uses now set the reuse_logs option to trigger a new fast open path.
For db's with prior changes (i.e. non-empty logs) this avoids three fsync calls
(on average) for every open as well as the need to compact (rewrite) the db.
More info at:
https://github.com/google/leveldb/commit/251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa
BUG=468810
Review URL: https://codereview.chromium.org/1025433003
Cr-Commit-Position: refs/heads/master@{#322433}
Diffstat (limited to 'extensions/browser/value_store')
-rw-r--r-- | extensions/browser/value_store/leveldb_value_store.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/browser/value_store/leveldb_value_store.cc b/extensions/browser/value_store/leveldb_value_store.cc index 58cf32f..56fd265 100644 --- a/extensions/browser/value_store/leveldb_value_store.cc +++ b/extensions/browser/value_store/leveldb_value_store.cc @@ -13,6 +13,7 @@ #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_thread.h" #include "extensions/browser/value_store/value_store_util.h" +#include "third_party/leveldatabase/env_chromium.h" #include "third_party/leveldatabase/src/include/leveldb/iterator.h" #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" @@ -328,6 +329,7 @@ scoped_ptr<ValueStore::Error> LeveldbValueStore::EnsureDbIsOpen() { leveldb::Options options; options.max_open_files = 0; // Use minimum. options.create_if_missing = true; + options.reuse_logs = leveldb_env::kDefaultLogReuseOptionValue; leveldb::DB* db = NULL; leveldb::Status status = |