Repository navigation
Close database connections after rollback cleanup fails - #140
Open
RichardHoekstra wants to merge 3 commits into
Open
RichardHoekstra wants to merge 3 commits into
RichardHoekstra wants to merge 3 commits into
Conversation
RichardHoekstra
requested a deployment
to
external-ci
October 27, 2026 23:37 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
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.
Problem
A failing rollback finish hook skips physical connection close, leaving the PostgreSQL session and its locks alive. Failed stack cleanup can also skip later connections and retain local mutex state.
Change
Attempt rollback and close separately, preserve their errors, release remaining local Work/mutex state after disconnect, and attempt every stashed connection.
Validation
system.nodejs.test_dbcleanupfails on the baseline with only the prerequisite and passes with this fix. Seven regressions cover session locks, the mutex service and controlled close barriers. Selected compatibility, TypeScript and unchanged ESLint checks pass.Dependency and scope
Depends on #138. This branch includes that prerequisite; merge it first. Stashed disconnect retains its existing close-only behavior. Disconnect does not establish the outcome of an unacknowledged commit.
Validated on the official 6.2 image for GitHub main
a91a7a28, with the candidate sources installed. Full upstream CI has not been run.