Skip to content

fix: poll every 10s when old deployments are actively draining#112

Merged
lukebond merged 1 commit intorestatedev:mainfrom
mt-bt:fix/drain-poll-interval
Mar 27, 2026
Merged

fix: poll every 10s when old deployments are actively draining#112
lukebond merged 1 commit intorestatedev:mainfrom
mt-bt:fix/drain-poll-interval

Conversation

@mt-bt
Copy link
Copy Markdown
Contributor

@mt-bt mt-bt commented Mar 26, 2026

When old deployments have active invocations (draining), cleanup_old_replicasets / cleanup_old_configurations skip them without setting next_removal, so the controller falls back to the hardcoded 5-minute requeue. This means even with drainDelaySeconds: 0, cleanup takes ~5 minutes.

This PR polls every 10 seconds when active drains are detected, so the operator notices drain completion promptly instead of always waiting 5 minutes.

Open to discussion on the 10s interval - happy to make it configurable or use a different value if there's a preference.

Follow-up to #96.

@mt-bt mt-bt force-pushed the fix/drain-poll-interval branch from ddc42c3 to e661222 Compare March 26, 2026 23:03
When old deployments have active invocations (draining), the cleanup
functions skip them without setting next_removal, causing the controller
to fall back to the hardcoded 5-minute requeue. This means even with
drainDelaySeconds: 0, cleanup takes ~5 minutes.

Poll every 10s when active drains are detected, so the operator notices
drain completion promptly.
@mt-bt mt-bt changed the title fix: requeue based on drain poll interval during active drains fix: poll every 10s when old deployments are actively draining Mar 27, 2026
@mt-bt mt-bt force-pushed the fix/drain-poll-interval branch from e661222 to 3338559 Compare March 27, 2026 00:18
@tillrohrmann
Copy link
Copy Markdown
Contributor

Thanks for creating this PR @mt-bt. @lukebond could you take a look at it?

Copy link
Copy Markdown
Contributor

@lukebond lukebond left a comment

Choose a reason for hiding this comment

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

thank you for the contribution @mt-bt! LGTM

@lukebond lukebond merged commit a51286b into restatedev:main Mar 27, 2026
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants