From 140d1daeca36ae4489083cc5dfa1c2c1e5b6fbd6 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Sat, 2 May 2026 00:55:41 -0500 Subject: [PATCH] Document SQLite lifecycle override for offline storage Explain when skipSqliteInitAndShutdown should be enabled so apps that own SQLite globally know the SDK will stop calling sqlite3_initialize()/sqlite3_shutdown() for them. Files changed: - docs/Offline-storage-settings.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/Offline-storage-settings.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/Offline-storage-settings.md b/docs/Offline-storage-settings.md index 78f5b2aff..137cb5c34 100644 --- a/docs/Offline-storage-settings.md +++ b/docs/Offline-storage-settings.md @@ -11,6 +11,15 @@ There are several configurations that can alter the offline storage handler beha | CFG_INT_STORAGE_FULL_CHECK_TIME | int | 5000 | Sets the minimum time (ms) between storage full notifications. | CFG_BOOL_ENABLE_DB_DROP_IF_FULL | bool | false | When set to true, trim events if cache size reaches CFG_INT_CACHE_FILE_SIZE | CFG_STR_CACHE_FILE_PATH | string | %TEMP% | Sets the path for the cache file +| skipSqliteInitAndShutdown | string | unset | When set to `"true"`, the SDK skips its process-wide `sqlite3_initialize()` and `sqlite3_shutdown()` calls for offline storage. + +## Shared SQLite lifecycle ownership + +By default, the SDK initializes SQLite when the first offline-storage-backed instance starts and shuts SQLite down after the last such instance is released. + +Set `skipSqliteInitAndShutdown` to `"true"` only when your application already owns the global SQLite lifecycle, for example when another subsystem initializes SQLite before the SDK starts and shuts it down after every SDK instance has been destroyed. + +When this option is enabled, the application is responsible for calling `sqlite3_initialize()` before creating a `LogManager` that uses offline storage and for delaying `sqlite3_shutdown()` until all SDK offline storage instances have been released. ## Deprecated configurations