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

   # Which issue does this PR close?
   
   None. Bug found during maintenance review of the layer.
   
   # Rationale for this change
   
   `TailCutLayer` keeps latency statistics for each operation and uses an 
operation's own percentile to set its adaptive deadline. `TailCutStats` only 
had buckets for nine operations and mapped every other variant to the `Stat` 
bucket.
   
   `CreateDir` and `Presign` therefore recorded their latency into `Stat` 
history and calculated their deadlines from `Stat`'s latency (and vice versa). 
A fast `create_dir` or `presign` could pull `Stat`'s percentile down and cancel 
healthy `stat` calls, while fast `stat` calls could cancel otherwise-untracked 
`create_dir` or `presign` calls.
   
   # What changes are included in this PR?
   
   - Give every `Operation` variant its own latency histogram, including 
`CreateDir` and `Presign`. The unused `Info` slot also holds future 
`#[non_exhaustive]` variants so a new variant cannot silently reuse a live 
operation's baseline.
   - Add a regression test that verifies every operation maps to a distinct 
statistics entry.
   - Add paused-time tests that verify `create_dir` samples do not enter or 
shorten the `stat` baseline, and that `stat` samples do not cancel a 
`create_dir` that has no history of its own.
   
   # Are there any user-facing changes?
   
   Yes, bug fix only: `TailCutLayer` no longer shares latency statistics 
between operations, so `create_dir` and `presign` requests are not cut using 
`stat`'s baseline and no longer contaminate `stat` statistics. No API or 
configuration changes.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Pi (coding agent harness), delegated via T3 Code
   - Model: group/deepseek
   - Effort: max
   - Role: Confirmed the operation mapping on `origin/main`, wrote failing 
regression tests, implemented the per-operation histogram mapping, and ran 
formatting, clippy, and the crate test suite.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to