Skip to content

fix: keep polling on transport errors - #529

Draft
r-jais wants to merge 1 commit into
databricks:mainfrom
dbt-labs:fix/poll-transport-errors-dco
Draft

r-jais wants to merge 1 commit into
databricks:mainfrom
dbt-labs:fix/poll-transport-errors-dco

Conversation

@r-jais

@r-jais r-jais commented Nov 2, 2026

Copy link
Copy Markdown

A single transport-level failure of GetOperationStatus (connection reset, timeout) made pollOperation abandon a statement that was still running on the server.

pollOperation now treats a failure with no response as retryable: it keeps polling up to 30 consecutive failures (counter resets on any response), then returns a request error naming the operation and its last known state. HTTP 401/403/404 are not retryable and fail immediately. Responses that carry an error state behave as before. Ported from our fork (dbt-labs#7) onto the internal/backend/thrift layout.

Other permanent 4xx statuses (for example 400, 410) and 503s that persist are retried up to the 30-failure cap, not failed at once. That is acceptable: the cap bounds the wait to about 30 poll intervals, and the operation is still running server-side, so a brief extra wait is cheaper than abandoning it. 401/403/404 are the cases that cannot recover, so they fail fast.

Independent of the connect-timeout PR from the same fork (it edits backend.go, backend_test.go and CHANGELOG.md in other places, so whichever merges second needs a trivial rebase).

Part of dbt-labs/dbt#16697

Signed-off-by: Rashi Jaiswal <rashi.jaiswal@dbtlabs.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant