Skip to content

In heartbeat handle, proactively check for missed min_time#1088

Merged
spirali merged 2 commits intomainfrom
proactive-retract
Apr 7, 2026
Merged

In heartbeat handle, proactively check for missed min_time#1088
spirali merged 2 commits intomainfrom
proactive-retract

Conversation

@spirali
Copy link
Copy Markdown
Collaborator

@spirali spirali commented Apr 2, 2026

Optimization where worker proactively retracts prefilled tasks that missed min_time.
This speeds up to returning the task non-prefilled state and makes the scheduling more deterministic.

@spirali spirali force-pushed the proactive-retract branch from 81b2519 to d85be13 Compare April 2, 2026 17:08
@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Apr 3, 2026

Why is this done in the heartbeat handle? Seems a bit weird. Shouldn't this be a separate periodic background check?

@spirali
Copy link
Copy Markdown
Collaborator Author

spirali commented Apr 3, 2026

Why is this done in the heartbeat handle? Seems a bit weird. Shouldn't this be a separate periodic background check?

It should be, I just did not want to introduce a new config option 🙈.

@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Apr 3, 2026

This is an internal optimization, I don't think we have to make it configurable.

@spirali
Copy link
Copy Markdown
Collaborator Author

spirali commented Apr 3, 2026

It should be configurable for tests; otherwise, tests would be too long & dependent on an internal constant.

@spirali spirali force-pushed the proactive-retract branch from edede5a to 1eedad9 Compare April 7, 2026 15:36
@spirali
Copy link
Copy Markdown
Collaborator Author

spirali commented Apr 7, 2026

Removed from heartbeat; now it has a stand-alone loop & configuration.

@spirali spirali merged commit f7f3738 into main Apr 7, 2026
9 checks passed
@spirali spirali deleted the proactive-retract branch April 7, 2026 16:34
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.

2 participants