From 99c9b337ac0c33870bf0240d2b348047a712a83c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 May 2014 11:18:33 +0100 Subject: bitbake: 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. (Bitbake rev: ec28256ac2a30f047585e8f61200d764bc295ded) Signed-off-by: Richard Purdie --- bitbake/lib/bb/persist_data.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 994e61b0a6..5795bc835b 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/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""" -- cgit v1.2.3-54-g00ecf