Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Rc processing split pt2 #79259

Draft
wants to merge 1 commit into
base: rc-processing-split-pt1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/sentry/eventstore/processing/service_delegator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from sentry.utils.services import ServiceDelegator, make_writebehind_selector

backends_config = {
"errors": {
"path": "sentry.eventstore.processing.event_processing_store",
"executor": {
"path": "sentry.utils.services.ThreadedExecutor",
"options": {
"worker_count": 1,
},
},
},
"transactions": {
"path": "sentry.eventstore.processing.transaction_processing_store",
"executor": {
"path": "sentry.utils.services.ThreadedExecutor",
"options": {
"worker_count": 1,
},
},
},
}

selector = make_writebehind_selector(
option_name="rc-processing-split.rollout",
move_to="transactions",
move_from="errors",
key_fetch=lambda *args: "a-consistent-key",
)

eventstore_delegator = ServiceDelegator(
backend_base="sentry.eventstore.processing.base.EventProcessingStore",
backends=backends_config,
selector_func=selector,
)
2 changes: 2 additions & 0 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2793,3 +2793,5 @@
default=True,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register("rc-processing-split.rollout", type=float, default=0.0, flags=FLAG_AUTOMATOR_MODIFIABLE)
Loading