summaryrefslogtreecommitdiffstats
path: root/sync/syncable
diff options
context:
space:
mode:
authorshess <shess@chromium.org>2015-09-23 13:29:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-23 20:33:56 +0000
commit9a1948a4d6d445d5c8e209bdcd1cd050af72060b (patch)
treea2b6abac4673affa109bcc57ae72d67904ae8c29 /sync/syncable
parentfa2fd3809241aae99bf07463ff99ad03dc9a1e07 (diff)
downloadchromium_src-9a1948a4d6d445d5c8e209bdcd1cd050af72060b.zip
chromium_src-9a1948a4d6d445d5c8e209bdcd1cd050af72060b.tar.gz
chromium_src-9a1948a4d6d445d5c8e209bdcd1cd050af72060b.tar.bz2
[sql] Use memory-mapped I/O for sql::Connection.
sql::Connection::Open*() uses PRAGMA mmap_size to enable SQLite's memory-mapped I/O. Additionally instrument to flush dirty pages from the page cache after writes. BUG=489784,533682 Review URL: https://codereview.chromium.org/1349863003 Cr-Commit-Position: refs/heads/master@{#350362}
Diffstat (limited to 'sync/syncable')
-rw-r--r--sync/syncable/directory_backing_store.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc
index d49ede5..3ba54e6 100644
--- a/sync/syncable/directory_backing_store.cc
+++ b/sync/syncable/directory_backing_store.cc
@@ -1690,6 +1690,10 @@ void DirectoryBackingStore::ResetAndCreateConnection() {
db_->set_exclusive_locking();
db_->set_cache_size(32);
db_->set_page_size(database_page_size_);
+
+ // TODO(shess): Sync corruption tests interact poorly with mmap, disable for
+ // now. http://crbug.com/533682
+ db_->set_mmap_disabled();
if (!catastrophic_error_handler_.is_null())
SetCatastrophicErrorHandler(catastrophic_error_handler_);
}