summaryrefslogtreecommitdiffstats
path: root/sync/syncable
diff options
context:
space:
mode:
authorshess <shess@chromium.org>2015-09-29 10:21:18 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-29 17:22:02 +0000
commit5c2f4e50d96d8b2ae0ae4a5c7d319e6be3b33bca (patch)
tree61974e3ccc89c97cdca3384944a7fac59efffc8e /sync/syncable
parent5fb246dc31ded541d845101bd952659eab219a0e (diff)
downloadchromium_src-5c2f4e50d96d8b2ae0ae4a5c7d319e6be3b33bca.zip
chromium_src-5c2f4e50d96d8b2ae0ae4a5c7d319e6be3b33bca.tar.gz
chromium_src-5c2f4e50d96d8b2ae0ae4a5c7d319e6be3b33bca.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. [Relands https://crrev.com/9a1948a4d6d4, reverted at https://crrev.com/55c3216b15ce ] BUG=489784, 533682 Review URL: https://codereview.chromium.org/1368533003 Cr-Commit-Position: refs/heads/master@{#351344}
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_);
}