Skip to content

fix(auth): honor _retry_stop_after_attempts_count as total attempts - #1089

Open
atharva18-hue wants to merge 1 commit into
databricks:mainfrom
atharva18-hue:fix/retry-count-is-attempts-890
Open

atharva18-hue wants to merge 1 commit into
databricks:mainfrom
atharva18-hue:fix/retry-count-is-attempts-890

Conversation

@atharva18-hue

Copy link
Copy Markdown

Fixes #890 (ERRORRECOV-013, Thrift portion; the SEA/kernel side already honours the knob — see issue).

What changed: total = count - 1 in DatabricksRetryPolicy; backoff now indexed by retry history so backoff timing is unchanged; docstring corrected; CHANGELOG entry; tests updated plus 2 new regression tests (repro counts 1→1, 3→3, 30→30).

Verification: tests/unit/test_retry.py — 18 passed. Revert check: stashing only retry.py makes all 7 new/updated tests fail; restoring the fix makes them pass. The make_request loop is unchanged (14→14, 1→1 under a persistent 429).

Not verified locally: pyarrow-gated unit tests and E2E/conformance tests need CI / a live Databricks workspace — CI is the check for those.

DatabricksRetryPolicy mapped _retry_stop_after_attempts_count 1:1 onto
urllib3's `total`, which counts retries after the first request, so the
knob bought one extra wire attempt (count=1 still retried once). Set the
initial `total` to one less than the configured count, and index the
backoff by retries already performed so backoff timing is unchanged.

Fixes databricks#890

Signed-off-by: Atharva Chavhan <atharvachavhan18@gmail.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.

[coverage] Conformance findings: ERRORRECOV-013

1 participant