Skip to content

Close database connections after rollback cleanup fails - #140

Open
RichardHoekstra wants to merge 3 commits into
WebHare:mainfrom
RichardHoekstra:github/fix/database-disposal-failures
Open

RichardHoekstra wants to merge 3 commits into
WebHare:mainfrom
RichardHoekstra:github/fix/database-disposal-failures

Conversation

@RichardHoekstra

Copy link
Copy Markdown
Contributor

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_dbcleanup fails 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.

@RichardHoekstra
RichardHoekstra requested a review from a team October 27, 2026 15:41

This branch is waiting to be deployed

1 waiting deployment
external-ci — a36355cf Waiting Oct 27, 2026 by RichardHoekstra via setup #205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant