summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/db.py
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-11-06 16:45:23 +0000
commit7105d44d87783e4d54859d212cd6746cda49ab1d (patch)
tree9178629d6fea5222f6a9336d6bc34dc99f850d24 /bitbake/lib/prserv/db.py
parent5dca71bc2ab2a80cebb8fa52a5e518b42e7d699d (diff)
downloadpoky-7105d44d87783e4d54859d212cd6746cda49ab1d.tar.gz
bitbake: 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. (Bitbake rev: 0cdd48261daeb17efc528b5de0ac81c8836e8565) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv/db.py')
-rw-r--r--bitbake/lib/prserv/db.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py
index 3bdc04692e..9d6d11526a 100644
--- a/bitbake/lib/prserv/db.py
+++ b/bitbake/lib/prserv/db.py
@@ -235,6 +235,7 @@ class PRData(object):
235 self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False) 235 self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
236 self.connection.row_factory=sqlite3.Row 236 self.connection.row_factory=sqlite3.Row
237 self.connection.execute("pragma synchronous = off;") 237 self.connection.execute("pragma synchronous = off;")
238 self.connection.execute("PRAGMA journal_mode = WAL;")
238 self._tables={} 239 self._tables={}
239 240
240 def __del__(self): 241 def __del__(self):