From 4050991eae26c33acb1c1996fe1900b43ae0fa13 Mon Sep 17 00:00:00 2001 From: cmumford Date: Thu, 26 Mar 2015 11:28:33 -0700 Subject: 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} --- google_apis/gcm/engine/gcm_store_impl.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'google_apis') diff --git a/google_apis/gcm/engine/gcm_store_impl.cc b/google_apis/gcm/engine/gcm_store_impl.cc index 8f701a1..bc526c4 100644 --- a/google_apis/gcm/engine/gcm_store_impl.cc +++ b/google_apis/gcm/engine/gcm_store_impl.cc @@ -23,6 +23,7 @@ #include "google_apis/gcm/base/mcs_message.h" #include "google_apis/gcm/base/mcs_util.h" #include "google_apis/gcm/protocol/mcs.pb.h" +#include "third_party/leveldatabase/env_chromium.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" @@ -239,6 +240,7 @@ LoadStatus GCMStoreImpl::Backend::OpenStoreAndLoadData(LoadResult* result) { leveldb::Options options; options.create_if_missing = true; + options.reuse_logs = leveldb_env::kDefaultLogReuseOptionValue; leveldb::DB* db; leveldb::Status status = leveldb::DB::Open(options, path_.AsUTF8Unsafe(), &db); -- cgit v1.1