feat(replacer): optional concurrent replacement processing - #8376
Closed
sentry-junior[bot] wants to merge 1 commit into
Closed
feat(replacer): optional concurrent replacement processing#8376sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Add a --concurrency flag so one errors-replacer consumer can run more than one replacement message at a time via RunTaskInThreads. Same-project work stays serial; default concurrency=1 preserves the current path. Co-Authored-By: PDPM <pierre.massat@sentry.io>
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.
Spike / discussion PR: show what multi-message replacement concurrency could look like on one errors-replacer consumer.
Why
Today the errors replacer processes one kafka message at a time (
RunTask→flush_batch([one])). Intra-message work already fans out across clickhouse shards, but independent replacements (especially different projects) cannot overlap.During the US replacements backlog discussion we asked whether we could process more than one replacement at once without adding replicas. This PR sketches that path.
What changed
--concurrency(default 1, current behavior).concurrency > 1switches the strategy to arroyoRunTaskInThreads.project_idreplacements stay serial via per-project locks.What this does not do
How to try
Test plan
tests/cli/test_replacer.pyexpects concurrency passthroughRunTaskvsRunTaskInThreadsand invalid concurrencyRequested by PDPM.
--
View Junior Session in Sentry