Skip to content

Push maintenance leader startup logic down into maintenance package#1196

Open
brandur wants to merge 1 commit intomasterfrom
brandur-push-maintainer-logic
Open

Push maintenance leader startup logic down into maintenance package#1196
brandur wants to merge 1 commit intomasterfrom
brandur-push-maintainer-logic

Conversation

@brandur
Copy link
Copy Markdown
Contributor

@brandur brandur commented Apr 5, 2026

This one's a quick follow up to #1184. Unfortunately in order to cover
all the edge cases that Codex found during review we ended up with
fairly complex start logic for the queue maintainer because it needs to
have a separate goroutine, do a lot of context checking, and track its
current leadership "epoch" to make sure that an older start attempt
doesn't affect the start attempt booted off by a newer leadership
signal. This had left an unfortunate amount of code in client.go.

Here, break this all out into its own file in internal/maintenance/.
This lets us streamline Client back to a nicer point.

This one's a quick follow up to #1184. Unfortunately in order to cover
all the edge cases that Codex found during review we ended up with
fairly complex start logic for the queue maintainer because it needs to
have a separate goroutine, do a lot of context checking, and track its
current leadership "epoch" to make sure that an older start attempt
doesn't affect the start attempt booted off by a newer leadership
signal. This had left an unfortunate amount of code in `client.go`.

Here, break this all out into its own file in `internal/maintenance/`.
This lets us streamline `Client` back to a nicer point.
@brandur brandur force-pushed the brandur-push-maintainer-logic branch from 5326f39 to 4d86b90 Compare April 5, 2026 03:41
@brandur brandur requested a review from bgentry April 5, 2026 03:45
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.

1 participant