[tracker/direct-access: 1/122] libtracker-db: Enable Write-Ahead Logging in SQLite



commit c21b6927b3a73432ec31a32c01ab46933d0e72b0
Author: Jürg Billeter <j bitron ch>
Date:   Mon Jun 28 15:57:42 2010 +0200

    libtracker-db: Enable Write-Ahead Logging in SQLite
    
    This requires SQLite 3.7 and allows us to drop read_uncommitted.

 src/libtracker-data/tracker-db-manager.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 86b7109..7935a17 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -266,11 +266,7 @@ db_set_params (TrackerDBInterface *iface,
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\"");
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA auto_vacuum = 0;");
 
-	/* if we add direct access library (or enable running queries in parallel with updates,
-	   we need to disable read_uncommitted again
-	   however, when read_uncommitted is disabled, we need the custom page cache (wrapper)
-	   to avoid locking issues between long running batch transactions and queries */
-	tracker_db_interface_execute_query (iface, NULL, "PRAGMA read_uncommitted = True;");
+	tracker_db_interface_execute_query (iface, NULL, "PRAGMA journal_mode = WAL;");
 
 	if (page_size != TRACKER_DB_PAGE_SIZE_DONT_SET) {
 		g_message ("  Setting page size to %d", page_size);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]