bitbake: persist_data: Fix Locking Protocol Error
PATCH 1/1 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 <[email protected]>
--- bitbake/lib/bb/persist_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/persist_data.py +1 -1
@@ -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()
Signature · 1 line
2.20.1