From 9a1948a4d6d445d5c8e209bdcd1cd050af72060b Mon Sep 17 00:00:00 2001 From: shess Date: Wed, 23 Sep 2015 13:29:44 -0700 Subject: [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} --- sync/syncable/directory_backing_store.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sync/syncable') 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_); } -- cgit v1.1