fix(server): preserve in-memory SQLite across reconnects - #3175
Open
EmilienM wants to merge 1 commit into
Open
Conversation
Keep a dedicated SQLite connection alive so pool connection replacement retains the shared in-memory schema and objects. Closes NVIDIA#3173 Signed-off-by: Emilien Macchi <emacchi@redhat.com>
EmilienM
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 4, 2026 01:56
9 tasks
|
All contributors have signed the DCO ✍️ ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve in-memory SQLite state when SQLx replaces the gateway's operational pooled connection. The SQLite adapter now retains a dedicated keepalive connection to the same named shared-cache database, preventing schema and object loss during sandbox cleanup.
Related Issue
Closes #3173
Changes
architecture/gateway.md.Deviations from Plan
sqlite://?mode=memoryafter adversarial review identified that SQLx does not name that anonymous form automatically.Testing
mise run pre-commitpasses — blocked by 17 pre-existing missing SPDX headers in unrelated.tekton/anddeploy/konflux/files.cargo fmt --all -- --checkcargo clippy -p openshell-server --all-targets --features test-support -- -D warningscargo test -p openshell-server --features test-support persistence::tests -- --nocapture(63 passed, 3 pre-existing ignored)e2e/files changed and the existing Podman E2E uses file-backed SQLite, so it does not exercise this regression.Tests added:
persistence::tests::sqlite_in_memory_store_survives_pool_connection_replacementAdversarial review:
Checklist
Documentation updated:
architecture/gateway.md: documented the in-memory SQLite keepalive invariant