Skip to content

Commit ec9d8fb

Browse files
authored
fix(deletes): properly update clickhouse_settings (#7533)
When adding in `lightweight_deletes_sync` setting in #7522, I forgot that we had hardcoded the clickhouse settings, updates this to make sure we pass through the `clickhouse_settings`.
1 parent a935a73 commit ec9d8fb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

snuba/web/delete_query.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _execute_query(
280280
formatted_query = format_query(query)
281281
allocation_policies = _get_delete_allocation_policies(storage)
282282
query_id = uuid.uuid4().hex
283-
clickhouse_settings: MutableMapping[str, Any] = {"query_id": query_id}
283+
query_settings.push_clickhouse_setting("query_id", query_id)
284284
result = None
285285
error = None
286286

@@ -299,7 +299,11 @@ def _execute_query(
299299
allocation_policies,
300300
query_id,
301301
)
302-
result = storage.get_cluster().get_deleter().execute(formatted_query, clickhouse_settings)
302+
result = (
303+
storage.get_cluster()
304+
.get_deleter()
305+
.execute(formatted_query, query_settings.get_clickhouse_settings())
306+
)
303307
except AllocationPolicyViolations as e:
304308
error = QueryException.from_args(
305309
AllocationPolicyViolations.__name__,

0 commit comments

Comments
 (0)