Skip to content

fix(scheduler): back off due tasks with running mongo executions#1462

Open
bingran-you wants to merge 1 commit intodevfrom
codex/fix-mongo-running-backoff
Open

fix(scheduler): back off due tasks with running mongo executions#1462
bingran-you wants to merge 1 commit intodevfrom
codex/fix-mongo-running-backoff

Conversation

@bingran-you
Copy link
Copy Markdown
Contributor

Summary

  • add a short-lived local scheduler backoff when MongoDB still reports a running execution row for a due task
  • stop re-querying and re-reconciling the same due task on every scheduler poll cycle
  • add focused unit coverage for the new backoff helpers

Validation

  • cargo check --locked -p scheduler_module --lib
  • cargo test --locked -p scheduler_module ... is still blocked by a pre-existing unrelated compile failure in scheduler_module/src/scheduler/store/mongo.rs test code (ExecutionRow initializer missing task_id)

Refs #1459

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dowhiz Ready Ready Preview, Comment Apr 20, 2026 7:58pm

Copy link
Copy Markdown
Contributor

@Oliver-DoWhiz Oliver-DoWhiz left a comment

Choose a reason for hiding this comment

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

Reviewed the scheduler backoff change against the hot-loop issue. The new in-memory cooldown looks correctly scoped to task/user keys, avoids re-claiming the same due task every poll when Mongo still reports a running execution, and includes focused helper tests for the backoff lifecycle. CI is green on this PR, so I’m approving.

@Oliver-DoWhiz
Copy link
Copy Markdown
Contributor

Oliver-DoWhiz commented Apr 20, 2026 via email

@bingran-you bingran-you added the breeze:done Breeze finished handling this item label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breeze:done Breeze finished handling this item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants