From 8a27b894b6644add3b65b5f60f7715a08a66b699 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Thu, 22 May 2025 10:21:38 -0700 Subject: [PATCH] SQLite: Add TODO note about possibly using sqlite3_busy_timeout --- src/storage/backend/sqlite/SQLite.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storage/backend/sqlite/SQLite.cc b/src/storage/backend/sqlite/SQLite.cc index 2d31db761c..6a6be32ba7 100644 --- a/src/storage/backend/sqlite/SQLite.cc +++ b/src/storage/backend/sqlite/SQLite.cc @@ -97,6 +97,11 @@ OperationResult SQLite::DoOpen(OpenResultCallback* cb, RecordValPtr options) { return open_res; } + // TODO: Should we use sqlite3_busy_timeout here instead of using the pragma? That would + // at least let us skip over one. The busy timeout is per-connection as well, so it'll + // never fail to run like the other pragmas can. + // sqlite3_busy_timeout(db, 2000); + auto pragmas = backend_options->GetField("pragma_commands"); for ( const auto& iter : *(pragmas->Get()) ) { auto k = iter.GetHashKey();