Make actor template resync interval configurable - #1522
Open
Eitan Yarmush (EItanya) wants to merge 1 commit into
Open
Make actor template resync interval configurable#1522Eitan Yarmush (EItanya) wants to merge 1 commit into
Eitan Yarmush (EItanya) wants to merge 1 commit into
Conversation
Expose the polling interval as an ateapi duration flag so deployments can tune template discovery latency. Keep the 20-second default and reject nonpositive intervals. Signed-off-by: Eitan Yarmush <[email protected]>
Eitan Yarmush (EItanya)
requested review from
Julian Gutierrez Oschmann (juli4n),
Tim Hockin (thockin) and
Zoe Zhao (zoez7)
September 6, 2026 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Actor template discovery currently uses a fixed 20-second resync interval. This PR adds
--template-resync-intervalso deployments can tune that delay, preserving the20sdefault and rejecting nonpositive values. The setting also controls the reconciler's existing fallback retry delay.This is intentionally a small change to start a discussion about how template builds should be dispatched as the template catalog grows.
The current resync fetches and decodes every template, including completed ones. At 100,000 templates, a 20-second interval implies roughly 5,000 template rows read per second per replica, assuming scans finish quickly. This is an estimate from the code, not a benchmark.
Possible follow-ups:
FOR UPDATE SKIP LOCKEDtransactions, and recover expired leases. This still polls, but queries pending work rather than the full catalog.LISTEN/NOTIFYis not the proposed default because it serializes notifying commits.The main question is whether template builds need a broadcast change feed or a queue where replicas claim different jobs. Neither alternative is implemented here.
Full research: database costs, execution options, recovery requirements, and sources.
Validation: all Go race tests and repository verifiers passed using module mode with
NO_COLORunset. CLI checks confirmed the default and rejection of zero/negative intervals; the existing reconciliation test checks a custom interval.Fixes #<issue_number_goes_here>