summaryrefslogtreecommitdiffstats
path: root/sync/syncable
diff options
context:
space:
mode:
authorshess <shess@chromium.org>2015-10-06 10:39:16 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-06 17:39:52 +0000
commit7dbd4dee4702e30efb24c81898ae45dd0d502c41 (patch)
tree88ac7fb9857b0c80194ab219b5bcc40d19de8ac4 /sync/syncable
parent70b782d89203d62d8b4e7937615579a3fc04583b (diff)
downloadchromium_src-7dbd4dee4702e30efb24c81898ae45dd0d502c41.zip
chromium_src-7dbd4dee4702e30efb24c81898ae45dd0d502c41.tar.gz
chromium_src-7dbd4dee4702e30efb24c81898ae45dd0d502c41.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,537681,537636 [Relands https://crrev.com/9a1948a4d6d4 (#350362), reverted at https://crrev.com/55c3216b15ce (#350386), relanded at https://crrev.com/5c2f4e50d96d (#351344), reverted at https://crrev.com/745e18c52384 (#351596). May the waterfall have mercy on my CL.] Review URL: https://codereview.chromium.org/1382283003 Cr-Commit-Position: refs/heads/master@{#352631}
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_);
}