Skip to content

Commit 234f4ba

Browse files
authored
fix(taskworker) Remove high-throughput setting (#92158)
We added this setting when options checks for taskworkers were expensive (because we used isset()), now that we've made option reads cheaper via get(), we shouldn't need this setting.
1 parent f424e7a commit 234f4ba

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/sentry/conf/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,6 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
15101510
},
15111511
}
15121512

1513-
TASKWORKER_ENABLE_HIGH_THROUGHPUT_NAMESPACES = False
15141513
TASKWORKER_HIGH_THROUGHPUT_NAMESPACES = {
15151514
"ingest.profiling",
15161515
"ingest.transactions",

src/sentry/tasks/base.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,12 @@ def taskworker_override(
7575
def override(*args: P.args, **kwargs: P.kwargs) -> R:
7676
rollout_rate = 0
7777
option_flag = f"taskworker.{namespace}.rollout"
78-
check_option = True
79-
if namespace in settings.TASKWORKER_HIGH_THROUGHPUT_NAMESPACES:
80-
check_option = settings.TASKWORKER_ENABLE_HIGH_THROUGHPUT_NAMESPACES
81-
82-
if check_option:
83-
rollout_map = options.get(option_flag)
84-
if rollout_map:
85-
if task_name in rollout_map:
86-
rollout_rate = rollout_map.get(task_name, 0)
87-
elif "*" in rollout_map:
88-
rollout_rate = rollout_map.get("*", 0)
78+
rollout_map = options.get(option_flag)
79+
if rollout_map:
80+
if task_name in rollout_map:
81+
rollout_rate = rollout_map.get(task_name, 0)
82+
elif "*" in rollout_map:
83+
rollout_rate = rollout_map.get("*", 0)
8984

9085
if rollout_rate > random.random():
9186
return taskworker_attr(*args, **kwargs)

0 commit comments

Comments
 (0)