[ENH](cli): add retry logic with exponential backoff to copy command#7102
Open
rescrv wants to merge 1 commit into
Open
[ENH](cli): add retry logic with exponential backoff to copy command#7102rescrv wants to merge 1 commit into
rescrv wants to merge 1 commit into
Conversation
Wrap all network calls in the copy command with exponential backoff retries using the backon crate. This makes the copy operation robust against transient network errors, rate limiting, and server errors. Key changes: - Add backon dependency for retry support - Classify errors as retryable (timeouts, 429, 5xx, network) vs deterministic (400, 404, validation) - Wrap list, get, create, search, add, and count calls in retry logic - Use get_or_create_collection for idempotent collection creation - Verify target collection is empty after get_or_create to prevent partial-copy corruption - Add unit tests for retryable error classification Co-authored-by: AI
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Wrap all network calls in the copy command with exponential backoff
retries using the backon crate. This makes the copy operation robust
against transient network errors, rate limiting, and server errors.
Key changes:
deterministic (400, 404, validation)
partial-copy corruption
Test plan
CI + will run a local copy during review
Migration plan
N/A
Observability plan
N/A
Documentation Changes
N/A
Co-authored-by: AI