mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
bitbake: serv/db: Take an excluside lock on the database
We only support one server using the database at a time so take an exclusive lock and avoid later lock overhead. (Bitbake rev: e3e39be6f2d063858c92971ce8ccd89c95d4f26d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -224,7 +224,7 @@ class PRData(object):
|
|||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.EEXIST:
|
if e.errno != errno.EEXIST:
|
||||||
raise e
|
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.connection.row_factory=sqlite3.Row
|
||||||
self._tables={}
|
self._tables={}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user