| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
When enabled, the connector only retries on 429/503 if the server includes a Retry-After header in the response. This prevents duplicate side effects for non-idempotent ExecuteStatement operations where the server has not explicitly signaled that retry is safe. The new opt-in parameter `_retry_server_directed_only` threads through ClientContext, all three DatabricksRetryPolicy construction sites (Thrift, SEA, UnifiedHttpClient), and the retry policy's should_retry/is_retry methods. Default behavior (retry without requiring the header) is unchanged. Signed-off-by: Shubham Dhal <shubham.dhal@databricks.com>
Inline kwargs.get() at the single point of use in ThriftDatabricksClient and SeaHttpClient instead of storing as dead instance state. Signed-off-by: Shubham Dhal <shubham.dhal@databricks.com>
- Rename server_directed_only to respect_server_retry_after_header throughout for clarity - Store _respect_server_retry_after_header as instance variable in Thrift/SEA backends to match existing kwargs extraction pattern - Replace duplicate test fixture with _make_retry_policy(**overrides) helper for flexible policy construction in tests Signed-off-by: Shubham Dhal <shubham.dhal@databricks.com>
There was a problem hiding this comment.
LGTM. Thanks for making the changes
Sorry, something went wrong.
Signed-off-by: Shubham Dhal <shubham.dhal@databricks.com>
….6 (#1363) ## Summary - Bumps `databricks-sql-connector` upper bound from `<4.1.4` to `<4.1.6`, allowing users to install connector `4.1.5` - Connector `4.1.5` introduced [`_respect_server_retry_after_header`](databricks/databricks-sql-python#756), which users can now opt into via `connection_parameters` in `profiles.yml` ## Context Customers using `use_materialization_v2: true` experience duplicate rows when the server returns HTTP 503 after already committing an INSERT. The connector blindly retries, causing data to be written twice. With `_respect_server_retry_after_header: true`, retries only occur when the server explicitly sends a `Retry-After` header, preventing duplicate writes from infrastructure-level 503s. ## Test plan - [x] All 744 unit tests pass (`hatch run unit`) - [x] E2E verification with a dummy dbt project against UC SQL endpoint: - `dbt debug` + `dbt run` succeed with default profile (connector default `False` applied) - `dbt debug` + `dbt run` succeed with `_respect_server_retry_after_header: true` explicitly set --------- Co-authored-by: Shubham Dhal <shubham.dhal@databricks.com>
|
E2E/Code Coverage tests can't run against fork PRs. I have ran these locally to verify all fine. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Test plan