Skip to content

Commit 652b0e8

Browse files
Rachel ChenRachel Chen
authored andcommitted
fix: shortcircuit for storages with no allocaiton policies
1 parent cf7932e commit 652b0e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

snuba/web/db_query.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from snuba.downsampled_storage_tiers import Tier
2828
from snuba.query import ProcessableQuery
2929
from snuba.query.allocation_policies import (
30+
DEFAULT_PASSTHROUGH_POLICY,
3031
MAX_THRESHOLD,
3132
AllocationPolicy,
3233
AllocationPolicyViolations,
@@ -809,7 +810,7 @@ def _apply_allocation_policies_quota(
809810
Sets the resource quota in the query_settings object to the minimum of all available
810811
quota allowances from the given allocation policies.
811812
"""
812-
if len(allocation_policies) == 0:
813+
if allocation_policies == [DEFAULT_PASSTHROUGH_POLICY]:
813814
logger.info("No allocation policies to apply")
814815
return
815816

0 commit comments

Comments
 (0)