summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv
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:10:20 +0000
commitc35cecebc6a407bac14a9f1b8dff5dbc85130f77 (patch)
treed0adc4c43e72b3337d5d132d2441fc83bb9c4852 /bitbake/lib/prserv
parentc72d8913b3d64ba445807ac3a858c981fad8d3ea (diff)
downloadpoky-c35cecebc6a407bac14a9f1b8dff5dbc85130f77.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: 90b05e79764b684b20ce8454e89f05763b02ac97) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv')
-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):