diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-01-03 10:36:11 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 11:15:58 +0000 |
commit | 93cd15644f9d12b38abea276fee7b5bade0276df (patch) | |
tree | 3d83e8a2ec212ac89674db2bde59a4d44dae1c99 /lib | |
parent | 9a529bb2658a4046dafbf32e1eb503d84e64e947 (diff) | |
download | bitbake-contrib-93cd15644f9d12b38abea276fee7b5bade0276df.tar.gz |
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@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/persist_data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py index 4468facd1..0d44100f1 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() |