summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-05 16:58:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:09:50 +0000
commit90b05e79764b684b20ce8454e89f05763b02ac97 (patch)
tree4eb239ce25c1d2f8e29bd5b30cdb6ee1bbabbf09
parent08cf468ab751f4c6e4ffdab2d8e5d748f7698593 (diff)
downloadbitbake-90b05e79764b684b20ce8454e89f05763b02ac97.tar.gz
prserv: Use WAL mode
Ideally, we want the PR service to have minimal influence from queued disk IO. sqlite tends to be paranoid about data loss and locks/fsync calls. There is a "WAL mode" which changes the journalling mechanism and would appear much better suited to our use case. This patch therefore switches the database to use WAL mode. With this change, write overhead appears significantly reduced. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/prserv/db.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/prserv/db.py b/lib/prserv/db.py
index 3bdc04692..9d6d11526 100644
--- a/lib/prserv/db.py
+++ b/lib/prserv/db.py
@@ -235,6 +235,7 @@ class PRData(object):
self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
self.connection.row_factory=sqlite3.Row
self.connection.execute("pragma synchronous = off;")
+ self.connection.execute("PRAGMA journal_mode = WAL;")
self._tables={}
def __del__(self):