You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "dentiny (via GitHub)" <gi...@apache.org> on 2026/04/27 08:16:03 UTC

[PR] feat(retry): introduce retry budget in retry layer [opendal]

dentiny opened a new pull request, #7430:
URL: https://github.com/apache/opendal/pull/7430

   # Which issue does this PR close?
   
   Closes https://github.com/apache/opendal/issues/7376
   
   # Rationale for this change
   
   Current retry layer's implementation only supports min/max retry duration, max count and jitter; when used together with timeout layer, we could also cap the upper bound for operation duration.
   But in production, we've also observed retry storm, which downgrades already overloaded / bad service.
   
   Some implementation reference in the industry:
   - twitter's internal rpc finagle: https://github.com/twitter/finagle/blob/develop/finagle-core/src/main/java/com/twitter/finagle/service/RetryBudgets.java
   - tower (which is used by aws-s3-transfer-manager): https://github.com/tower-rs/tower/tree/master/tower/src/retry/budget
   
   # What changes are included in this PR?
   
   This PR adds a no-op retry budget to retry layer:
   - It's kept no-op by default to keep the current retry behavior
   - It's a trait, so users could implement their own budget
     + Both deposit and withdraw take operation, so the trait allows either shared budget across all operations, or per-operation
     + Could be a followup item to provide a default budget implementation so users could leverage out-of-the-box
   
   # Are there any user-facing changes?
   
   Yes
   
   # AI Usage Statement
   
   Opus 4.7 made most of the code change, I did the code review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(retry): introduce retry budget in retry layer [opendal]

Posted by "dentiny (via GitHub)" <gi...@apache.org>.
dentiny commented on PR #7430:
URL: https://github.com/apache/opendal/pull/7430#issuecomment-4332266106

   ```sh
   ---- behavior::test_list_empty_dir ----
   test panicked: assertion `left == right` failed: only return the dir itself
     left: 0
    right: 1
   ```
   hmm not seem to relate to my changes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(retry): introduce retry budget in retry layer [opendal]

Posted by "dentiny (via GitHub)" <gi...@apache.org>.
dentiny commented on PR #7430:
URL: https://github.com/apache/opendal/pull/7430#issuecomment-4325568130

   ```sh
   make_bucket: test
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
   
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   100   141  100   141    0     0    934      0 --:--:-- --:--:-- --:--:--   940
   ./mc: line 1: a: No such file or directory
   ```
   CI failure doesn't seem to be related


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org