Skip to content

Handle error in outstandingCommit promise#423

Merged
kriszyp merged 3 commits into
mainfrom
reproduce-HNSW-race-386-take2
Apr 30, 2026
Merged

Handle error in outstandingCommit promise#423
kriszyp merged 3 commits into
mainfrom
reproduce-HNSW-race-386-take2

Conversation

@cb1kenobi
Copy link
Copy Markdown
Member

If a transaction fails due to ERR_BUSY, the retry mechanism returns a new promise from the error handler attached to the commitResolution promise. However the finally() on the outstandingCommit starts a new chain and the original rejected promise propagates the error to outstandingCommit. This error has already been handled, but we need to explicitly squetch it so that we don't get an unhandled rejection.

Supercedes #415

@cb1kenobi cb1kenobi requested a review from a team as a code owner April 29, 2026 01:49
@kriszyp
Copy link
Copy Markdown
Member

kriszyp commented Apr 29, 2026

maybe rebase to main to fix those update.test.js/sql errors, and let's see how the unit tests look.

Copy link
Copy Markdown
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, nice catch! Ironically I just fixed this same exact type of error recently here HarperFast/harper-pro@fea048c#diff-e707e24c4bc1646c60ac7da292c9707439ee0083f363f0433fda2f851c2b20d1R316

@kriszyp kriszyp added the patch label Apr 29, 2026
@kriszyp kriszyp merged commit 8333594 into main Apr 30, 2026
23 checks passed
@kriszyp kriszyp deleted the reproduce-HNSW-race-386-take2 branch April 30, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants