Skip to content

Commit

Permalink
Set a timeout for retries when we get SQLITE_BUSY
Browse files Browse the repository at this point in the history
  • Loading branch information
orlandov committed Nov 4, 2010
1 parent 777a4cd commit 090d71e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/database.cc
Expand Up @@ -101,6 +101,10 @@ int Database::EIO_Open(eio_req *req) {

req->result = rc;

// Set the a 10s timeout valuei for retries on BUSY errors.
sqlite3_busy_timeout(*dbptr, 10000);


// sqlite3 *db = *dbptr;
// sqlite3_commit_hook(db, CommitHook, open_req->dbo);
// sqlite3_rollback_hook(db, RollbackHook, open_req->dbo);
Expand Down

0 comments on commit 090d71e

Please sign in to comment.