dbcleanup: add a dedicated cleanup worker mode#205
Open
sharmila-oai wants to merge 1 commit intobuildbarn:mainfrom
Open
dbcleanup: add a dedicated cleanup worker mode#205sharmila-oai wants to merge 1 commit intobuildbarn:mainfrom
sharmila-oai wants to merge 1 commit intobuildbarn:mainfrom
Conversation
`bb-portal` currently starts the database cleanup loop inside every serving process. In a multi-replica deployment that multiplies cleanup work, makes compaction backlogs more expensive, and ties cleanup failures directly to the request-serving pods. Add a `--cleanup-worker-only` mode that starts only the BES cleanup loop. This lets deployments run cleanup in a separate singleton worker pod while leaving normal `bb-portal` replicas focused on serving traffic. Also put a small ordered batch limit on `CompactLogs()`. A single cleanup pass should not try to compact every eligible invocation in one shot when there is a large backlog.
1c27947 to
ab6ff10
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.
bb-portalcurrently starts the database cleanup loop inside every serving process. In a multi-replica deployment that multiplies cleanup work, makes compaction backlogs more expensive, and ties cleanup failures directly to the request-serving pods. We were seeing OOMs with especially trying to compact incomplete_build_logs.Add a
--cleanup-worker-onlymode that starts only the BES cleanup loop. This lets deployments run cleanup in a separate singleton worker pod while leaving normalbb-portalreplicas focused on serving traffic. I was thinking this could be a separate deployment and just re-use the backend image for bb-portal.Also put a small ordered batch limit on
CompactLogs(). A single cleanup pass should not try to compact every eligible invocation in one shot when there is a large backlog.