Skip to content

Preserve rollback failures after commit preparation fails - #137

Open
RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/work-preparation-error-preservation
Open

RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/work-preparation-error-preservation

Conversation

@RichardHoekstra

Copy link
Copy Markdown
Contributor

Problem

If commit preparation and its attempted rollback both fail, Work.commit() discards the rollback error. A later successful outer rollback can hide that failure permanently.

Change

Preserve both original errors in an AggregateError.

Validation

  • system.nodejs.test_work_prepare_errors: fails before, passes after.
  • Checks both error identities, completed rollback and subsequent SQL on the same connection.
  • Selected compatibility, TypeScript and unchanged ESLint checks pass.

Compatibility

The combined failure now has an AggregateError shape. Callers inspecting error classes must handle it; it must not be mistaken for the original retryable database error.

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 was successfully deployed

1 active deployment
external-ci — 55a6a77b Deployed Oct 27, 2026 by RichardHoekstra via setup #200
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