Skip to content

Commit

Permalink
code
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Chen authored and Rachel Chen committed Aug 8, 2024
1 parent 8dec882 commit 25ebac9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
DEFAULT_BYTES_SCANNED_LIMIT = int(1.28 * PETABYTE)
DEFAULT_TIMEOUT_PENALIZATION = DEFAULT_BYTES_SCANNED_LIMIT // 40
DEFAULT_BYTES_THROTTLE_DIVIDER = 2
DEFAULT_THREADS_THROTTLE_DIVIDER = 2
DEFAULT_THREADS_THROTTLE_DIVIDER = 1.5
QUOTA_UNIT = "bytes"
SUGGESTION = "The feature, organization/project is scanning too many bytes, this usually means they are abusing that API"

Expand Down Expand Up @@ -109,7 +109,7 @@ def _additional_config_definitions(self) -> list[AllocationPolicyConfig]:
"threads_throttle_divider",
"max threads divided by this number is the number of threads we use to execute queries for a throttled (project_id|organization_id, referrer)",
int,
DEFAULT_BYTES_THROTTLE_DIVIDER,
DEFAULT_THREADS_THROTTLE_DIVIDER,
),
]

Expand Down
2 changes: 1 addition & 1 deletion snuba/query/allocation_policies/per_referrer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
_REFERRER_CONCURRENT_OVERRIDE = -1
_REFERRER_MAX_THREADS_OVERRIDE = -1
_REQUESTS_THROTTLE_DIVIDER = 2
_THREADS_THROTTLE_DIVIDER = 2
_THREADS_THROTTLE_DIVIDER = 1.5

QUOTA_UNIT = "concurrent_queries"
SUGGESTION = "This feature is doing too many concurrent queries. Customers are being affected arbitrarily. Either means the feature is not being appropriately rate limited on the sentry side or that the queries are inefficient"
Expand Down

0 comments on commit 25ebac9

Please sign in to comment.