You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 716f625
Browse filesBrowse the repository at this point in the historyBrowse files
feat(grpc): broaden retry policy to RESOURCE_EXHAUSTED and ABORTED
Rename `retry_on_unavailable` → `retry_on_transient` in `rust/src/retry.rs`
and add a configurable `retryable_codes: HashSet<i32>` field to `RetryConfig`.
Default retry set is now {UNAVAILABLE, RESOURCE_EXHAUSTED, ABORTED}:
- RESOURCE_EXHAUSTED maps to HTTP 429 (rate limit) — should retry with backoff
- ABORTED signals an optimistic-concurrency conflict — tonic docs recommend retry
- DEADLINE_EXCEEDED is intentionally excluded — retrying without resetting the
deadline just fails again immediately
All 12 transport.rs callsites updated to `retry_on_transient`. New/updated
tests cover the expanded code set and a custom-codes override path.
Co-authored-by: P-0228
Copy file name to clipboardExpand all lines: AGENTS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,9 @@ except PineconeError as e:
283
283
print(e) # Validation, timeout, or connection error
284
284
```
285
285
286
-
**Retry behavior:** All HTTP methods (GET, HEAD, POST, PUT, PATCH, DELETE) are automatically retried on transient failures: connection errors (`httpx.TransportError`), 408 Request Timeout, 429 Too Many Requests (honoring `Retry-After`), and 5xx (500, 502, 503, 504). Pinecone's data-plane writes are idempotent at the server (upsert overwrites by ID, delete-by-ID is idempotent, update-by-ID is idempotent), so retrying upsert/query/fetch/delete/update on transient errors is safe. Backoff is floored full jitter: `uniform(0.1 * base, base)` where `base = min(backoff_factor**attempt, max_wait)`. Configure via `RetryConfig`.
286
+
**Retry behavior (HTTP):** All HTTP methods (GET, HEAD, POST, PUT, PATCH, DELETE) are automatically retried on transient failures: connection errors (`httpx.TransportError`), 408 Request Timeout, 429 Too Many Requests (honoring `Retry-After`), and 5xx (500, 502, 503, 504). Pinecone's data-plane writes are idempotent at the server (upsert overwrites by ID, delete-by-ID is idempotent, update-by-ID is idempotent), so retrying upsert/query/fetch/delete/update on transient errors is safe. Backoff is floored full jitter: `uniform(0.1 * base, base)` where `base = min(backoff_factor**attempt, max_wait)`. Configure via `RetryConfig`.
287
+
288
+
**Retry behavior (gRPC):** gRPC retries on UNAVAILABLE, RESOURCE_EXHAUSTED (rate limit), and ABORTED (concurrency conflict). DEADLINE_EXCEEDED is not retried — set a longer client timeout instead. All three default retryable codes are safe for Pinecone data-plane operations (upsert, query, fetch, delete-by-id, update), which are idempotent. Backoff uses full-jitter exponential: `uniform(0, min(max_backoff, initial_backoff * multiplier^attempt))`. The set of retryable codes is configurable via `RetryConfig.retryable_codes`.
0 commit comments