[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
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent f81aafc9cf
commit 485ece7ef1

@ -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 ;

Loading…
Cancel
Save