[oe-commits] [bitbake] 01/07: bitbake: persist_data: Fix Locking Protocol Error
git at git.openembedded.org
git at git.openembedded.org
Tue Jan 8 11:16:36 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
commit 93cd15644f9d12b38abea276fee7b5bade0276df
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Thu Jan 3 10:36:11 2019 -0600
bitbake: persist_data: Fix Locking Protocol Error
Under heavy load with process delays, sqlite can issues a "locking
protocol" error (SQLITE_PROTOCOL). Unfortunately, it is impossible to
distinguish between actual locking protocol errors and this race
condition, so they best that can be done is to retry the operation when
the error is detected.
[YOCTO #13108]
Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/persist_data.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index 4468fac..0d44100 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -59,7 +59,7 @@ class SQLTable(collections.MutableMapping):
try:
return f(self, *args, **kwargs)
except sqlite3.OperationalError as exc:
- if 'is locked' in str(exc) and count < 500:
+ if count < 500 and ('is locked' in str(exc) or 'locking protocol' in str(exc)):
count = count + 1
if reconnect:
self.reconnect()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list