fix(ateapi): retry stored-worker scan in syncer startup - #772
Open
Anish Ramasekar (aramase) wants to merge 1 commit into
Open
fix(ateapi): retry stored-worker scan in syncer startup#772Anish Ramasekar (aramase) wants to merge 1 commit into
Anish Ramasekar (aramase) wants to merge 1 commit into
Conversation
Benjamin Elder (BenTheElder)
requested a review
from Julian Gutierrez Oschmann (juli4n)
August 13, 2026 16:53
Julian Gutierrez Oschmann (juli4n)
requested review from
sfunkenhauser
and removed request for
Julian Gutierrez Oschmann (juli4n)
August 13, 2026 16:55
sfunkenhauser
requested changes
Aug 14, 2026
| // cleanup until the next restart if the store stayed briefly unavailable; the | ||
| // retry runs in the background startup goroutine (off the serving path) and, on | ||
| // a lasting outage, issues at most one cheap failing list per Cap interval. | ||
| func (s *WorkerPoolSyncer) listAllStoredWorkers(ctx context.Context) ([]*ateapipb.Worker, error) { |
Collaborator
There was a problem hiding this comment.
Can we add the retry logic around the API call, and then just process 1 page of workers at a time so we don't need to load all workers into memory?
Contributor
Author
There was a problem hiding this comment.
Done. It now reads and enqueues one page at a time, so we never hold all workers in memory, and the retry wraps the single ListWorkers call with capped backoff and reuses the same page cursor instead of restarting from page 0. Enqueue is incremental now, so a mid-scan cancel keeps the pages already queued and the rest get picked up next startup. Added a multi-page test that fails a later page once and checks every worker still gets enqueued.
Anish Ramasekar (aramase)
force-pushed
the
aramase/i/fix_609_orphan_reconcile_retry
branch
from
August 15, 2026 19:00
0c839f2 to
996022a
Compare
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.
Fixes #609
The startup stored-worker scan (
enqueueStoredWorkers) returned on the firstListWorkerserror, skipping orphan cleanup until the next restart. The#674workqueue only retries per-key reconciles, not this initial scan, so retry the scan with cappedwait.Backoffuntil it succeeds or the context is cancelled.