Skip to content

Commit

Permalink
protect complexity bounds setter with lock
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aalam committed Sep 17, 2024
1 parent a737f33 commit 8ca2730
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/snowflake/snowpark/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ def large_query_breakdown_complexity_bounds(self, value: Tuple[int, int]) -> Non
raise ValueError(
f"Expecting a tuple of lower and upper bound with the lower bound less than the upper bound. Got (lower, upper) = ({value[0], value[1]})"
)
self._conn._telemetry_client.send_large_query_breakdown_update_complexity_bounds(
self._session_id, value[0], value[1]
)
with self._lock:
self._conn._telemetry_client.send_large_query_breakdown_update_complexity_bounds(
self._session_id, value[0], value[1]
)

self._large_query_breakdown_complexity_bounds = value
self._large_query_breakdown_complexity_bounds = value

@custom_package_usage_config.setter
@experimental_parameter(version="1.6.0")
Expand Down

0 comments on commit 8ca2730

Please sign in to comment.