summaryrefslogtreecommitdiffstats
path: root/lib/bb/persist_data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-03 11:18:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-03 11:24:32 +0100
commitec28256ac2a30f047585e8f61200d764bc295ded (patch)
treefed534652afb7d04266cd135f7a8c8dbfc3fccc6 /lib/bb/persist_data.py
parentcf763cddc3faa2361b4c4dbd08419e4ebabf208f (diff)
downloadbitbake-contrib-ec28256ac2a30f047585e8f61200d764bc295ded.tar.gz
persist_data: Avoid fsync() calls
If the power were to fail, it doesn't matter to us much if the data makes it to disk or not, we'd have other problems. However an fsync() call on a multi build autobuilder is painful so lets avoid them. This is particularly true in this case if a timeout causes a reconnect during a build. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/persist_data.py')
-rw-r--r--lib/bb/persist_data.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index 994e61b0a..5795bc835 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -199,7 +199,9 @@ class PersistData(object):
del self.data[domain][key]
def connect(database):
- return sqlite3.connect(database, timeout=5, isolation_level=None)
+ connection = sqlite3.connect(database, timeout=5, isolation_level=None)
+ connection.execute("pragma synchronous = off;")
+ return connection
def persist(domain, d):
"""Convenience factory for SQLTable objects based upon metadata"""