Skip to content

attempt recovery of wedged mutations - #240

Draft
ianmacartney wants to merge 15 commits into
graphite-base/240from
ian/recover-mutations-commit-ts
Draft

ianmacartney wants to merge 15 commits into
graphite-base/240from
ian/recover-mutations-commit-ts

Conversation

@ianmacartney

@ianmacartney ianmacartney commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

attempt recovery of wedged mutations

fix merge artifacts breaking the build

Resolve batch-worker merge leftovers in loop.ts:

  • vCompletion.runResult now uses vResultInternal so stuckInScheduler
    flows through the batch to handleCompletions.
  • Remove the duplicate backoffMs block left by the merge (it redeclared
    the variable and dereferenced possibly-undefined work.retryBehavior).

Simplify stuck mutation recovery with commit-ordered retries

ianmacartney commented Sep 18, 2026 •

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new

pkg-pr-new Bot commented Sep 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/workpool/@convex-dev/workpool@240

commit: 7492484

Resolve batch-worker merge leftovers in loop.ts:
- vCompletion.runResult now uses vResultInternal so stuckInScheduler
  flows through the batch to handleCompletions.
- Remove the duplicate backoffMs block left by the merge (it redeclared
  the variable and dereferenced possibly-undefined work.retryBehavior).
Comment thread src/component/loop.ts
Comment on lines +493 to +496
// Mutations only retry when recovery replaces a stuck scheduler run.
if (work.fnType === "mutation") {
state.report.conflicted = (state.report.conflicted ?? 0) + 1;
recordCompleted(console, work, "retrying conflicted", undefined);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i don't think this is a very important distinction, and "conflicted" is the wrong verb. "rescheduled" is better

@ianmacartney
ianmacartney force-pushed the ian/recover-mutations-commit-ts branch from 7492484 to 14a510a Compare October 9, 2026 06:24
@ianmacartney
ianmacartney changed the base branch from ian/use-commit-ts to graphite-base/240 October 10, 2026 01:35
@ianmacartney
ianmacartney changed the base branch from graphite-base/240 to ian/use-commit-ts October 22, 2026 01:39
@ianmacartney
ianmacartney changed the base branch from ian/use-commit-ts to graphite-base/240 October 28, 2026 02:00
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