From 485ece7ef1efb92e5ea9692d3d72a2365be8df72 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 11 Oct 2017 06:17:12 -0700 Subject: [PATCH] [sql] bump busy timeout from 1s to 10s Summary: This is to avoid getting BUSY from sqlite when the machine is busy (not necessarily busy because of infer). Reviewed By: jberdine Differential Revision: D6020022 fbshipit-source-id: ca0f913 --- infer/src/base/ResultsDir.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/base/ResultsDir.ml b/infer/src/base/ResultsDir.ml index ef792635f..a0c875ab2 100644 --- a/infer/src/base/ResultsDir.ml +++ b/infer/src/base/ResultsDir.ml @@ -89,7 +89,7 @@ let db_close () = let new_database_connection () = db_close () ; let db = Sqlite3.db_open ~mode:`NO_CREATE ~cache:`PRIVATE ~mutex:`FULL database_fullpath in - Sqlite3.busy_timeout db 1000 ; + Sqlite3.busy_timeout db 10_000 ; (* Higher level of "synchronous" are only useful to guarantee that the db will not be corrupted if the machine crashes for some reason before the data has been actually written to disk. We do not need this kind of guarantee for infer results as one can always rerun infer if interrupted. *) SqliteUtils.exec db ~log:"synchronous=OFF" ~stmt:"PRAGMA synchronous=OFF" ; database := Some db ;