fix(gateway): batch SSH session cleanup writes - #3000
Open
drew wants to merge 1 commit into
Open
Conversation
Part of #2999. Signed-off-by: Drew Newberry <anewberry@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Aug 28, 2026
Collaborator
Author
Issue fixture verificationVerified commit
Full evidence: #2999 (comment) |
Collaborator
Author
|
Full code review completed.
Ready for maintainer review. |
drew
marked this pull request as ready for review
August 28, 2026 04:35
drew
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 28, 2026 04:35
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
Batch SSH-session persistence cleanup into bounded set-based deletes so sandbox teardown and the session reaper do not issue one database write per session. This addresses the gateway-side contention risk reported in #2999 without changing SQLite journal settings, timeouts, or session ownership schema.
Related Issue
Part of #2999.
This is PR 1 of 2. The issue does not currently carry an accepted-state label; the direct implementation and ready-for-review request authorized this submission, while maintainers retain the acceptance and merge decision.
Changes
delete_manystore operation with fixed 128-ID chunks for SQLite and PostgresTesting
mise run pre-commitmise run test(review rerun: 1,443 server tests passed)main, then passed on this PR and the combined branchesmise run e2e:dockermise run cipasses locally — all Rust, Python, TypeScript, lint, compile, and policy checks passed; three unrelated Go gateway fixture tests fail because this workstation's hard-coded/etc/openshell/gateways/defaultis included as an unexpected system fixtureReview
A full line-by-line review covered both persistence backends, chunk bounds, empty/duplicate/missing IDs, object-type isolation, pagination before mutation, partial-chunk idempotency, cleanup/reaper telemetry, secret-safe logging, tests, and architecture documentation. No actionable findings remained.
Checklist