Skip to content

fix(taskworker) Remove high-throughput setting #92158

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,6 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
},
}

TASKWORKER_ENABLE_HIGH_THROUGHPUT_NAMESPACES = False
TASKWORKER_HIGH_THROUGHPUT_NAMESPACES = {
"ingest.profiling",
"ingest.transactions",
Expand Down
17 changes: 6 additions & 11 deletions src/sentry/tasks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,12 @@ def taskworker_override(
def override(*args: P.args, **kwargs: P.kwargs) -> R:
rollout_rate = 0
option_flag = f"taskworker.{namespace}.rollout"
check_option = True
if namespace in settings.TASKWORKER_HIGH_THROUGHPUT_NAMESPACES:
check_option = settings.TASKWORKER_ENABLE_HIGH_THROUGHPUT_NAMESPACES

if check_option:
rollout_map = options.get(option_flag)
if rollout_map:
if task_name in rollout_map:
rollout_rate = rollout_map.get(task_name, 0)
elif "*" in rollout_map:
rollout_rate = rollout_map.get("*", 0)
rollout_map = options.get(option_flag)
if rollout_map:
if task_name in rollout_map:
rollout_rate = rollout_map.get(task_name, 0)
elif "*" in rollout_map:
rollout_rate = rollout_map.get("*", 0)

if rollout_rate > random.random():
return taskworker_attr(*args, **kwargs)
Expand Down
Loading