Skip to content

fix(difs): Make migration tasks more reliable - #123148

Merged
lcian merged 6 commits into
masterfrom
fix/durable-debug-file-migration-shards
Sep 1, 2026
Merged

lcian merged 6 commits into
masterfrom
fix/durable-debug-file-migration-shards

Conversation

@lcian

@lcian lcian commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

The migration job right now is unreliable: shards vanish without any associated logs or errors.
This requires manual re-enqueuing of the failed shards.

It's not clear why the shards vanish, but this PR adds 2 things that should make that much less likely:

  • The migration tasks now await successor delivery before recording that the successor was spawned, and tries Kafka delivery up to 3 times. Previously, we were sending the successor message async in the background, and immediately marking the current shard as done.
  • We retry activations that exceed their processing deadline, up to five times with a 30-second delay. This is something we have Sentry errors for and we've observed a few times, although the bulk of the "failures" are shards that just disappear.

Wait for successor task delivery before marking an activation as spawned, and retry activations that exceed their processing deadline.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 31, 2026
@lcian
lcian requested a review from a team August 31, 2026 16:18
@lcian lcian changed the title fix(debug-files): Preserve objectstore migration shards fix(difs): Make migration tasks more reliable Aug 31, 2026
Retry successor task production and delivery waits twice with exponential backoff while preserving the task-level processing deadline policy.
@lcian
lcian marked this pull request as ready for review September 1, 2026 09:17
@lcian
lcian requested a review from a team as a code owner September 1, 2026 09:17
@lcian
lcian enabled auto-merge (squash) September 1, 2026 10:01
@lcian
lcian disabled auto-merge September 1, 2026 10:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 85a314c. Configure here.

@lcian
lcian enabled auto-merge (squash) September 1, 2026 12:16
@lcian
lcian merged commit 6c02cc5 into master Sep 1, 2026
87 of 93 checks passed
@lcian
lcian deleted the fix/durable-debug-file-migration-shards branch September 1, 2026 12:25
sentry-junior Bot added a commit that referenced this pull request Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants