* [PATCH] bitbake: persist_data: Fix Locking Protocol Error
@ 2019-01-03 16:36 Joshua Watt
0 siblings, 0 replies; only message in thread
From: Joshua Watt @ 2019-01-03 16:36 UTC (permalink / raw)
To: bitbake-devel
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@gmail.com>
---
bitbake/lib/bb/persist_data.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index 4468facd18f..0d44100f103 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/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()
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-03 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-03 16:36 [PATCH] bitbake: persist_data: Fix Locking Protocol Error Joshua Watt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox