Skip to content

Commit 23b4330

Browse files
ai: apply changes for #923 (1 review thread)
Addresses: - #3836901963 at src/databricks/sql/backend/kernel/client.py:716 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent b4ad166 commit 23b4330

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/databricks/sql/backend/kernel/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,14 @@ def get_query_state(self, command_id: CommandId) -> CommandState:
694694
# Server is the source of truth for async command state. Use the
695695
# retained owning handle before result streaming starts so kernel
696696
# async statement telemetry is finalized on the original
697-
# ExecuteStatementAsync telemetry object. Once result streaming
698-
# has been claimed (or when this connector never held the handle
699-
# — cross-process / fresh-cursor cases), re-attach to the
697+
# ExecuteStatementAsync telemetry object. The owning-handle path
698+
# is per-connection, not per-cursor: any cursor on the submitting
699+
# connection (including a fresh cursor resuming the id) resolves
700+
# the same owning handle until result streaming is claimed — see
701+
# the concurrency note below for the limits that places on
702+
# concurrent polling. Once result streaming has been claimed, or
703+
# when this connector genuinely never held the handle (a
704+
# cross-process / restarted-process resume), re-attach to the
700705
# statement by id. SEA keys GetStatementStatus purely on the id,
701706
# so a statement the connector no longer holds a handle for is
702707
# still queryable. CLOSED comes straight from the server: after a

0 commit comments

Comments
 (0)