* {PATCH] serv/db: Take an excluside lock on the database
@ 2013-08-31 22:42 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-08-31 22:42 UTC (permalink / raw)
To: bitbake-devel
We only support one server using the database at a time so take an exclusive
lock and avoid later lock overhead.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py
index dad445b..5599355 100644
--- a/bitbake/lib/prserv/db.py
+++ b/bitbake/lib/prserv/db.py
@@ -214,7 +214,7 @@ class PRData(object):
except OSError as e:
if e.errno != errno.EEXIST:
raise e
- self.connection=sqlite3.connect(self.filename, isolation_level="DEFERRED", check_same_thread = False)
+ self.connection=sqlite3.connect(self.filename, isolation_level="EXCLUSIVE", check_same_thread = False)
self.connection.row_factory=sqlite3.Row
self._tables={}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-31 22:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-31 22:42 {PATCH] serv/db: Take an excluside lock on the database Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox