Xuanwo opened a new pull request, #8733: URL: https://github.com/apache/opendal/pull/8733
# Which issue does this PR close? None. Bug found during maintenance review of the layer. # Rationale for this change `TailCutLayer` promises to cancel I/O that runs far slower than the historical baseline, but three paths silently bypassed `with_deadline`/`with_io_deadline`, so they could hang forever and their latencies never fed the estimator: - `Deleter::delete()` forwarded directly to the inner deleter. For one-shot deleters the actual `DELETE` request happens in `delete()` while `close()` is a no-op, so the deadline never engaged on the common single-delete path. - `Service::restore()` was the only service-level operation without `with_deadline` (`stat`, `rename`, `create_dir`, `presign` all have it). - `Service::compose()` returned the inner `Composer` unwrapped, so both `compose()` and `close()` (which performs the real multipart-complete call on most backends) bypassed the deadline entirely. # What changes are included in this PR? - Wrap `Deleter::delete()` with the same `Operation::Delete` deadline and latency-recording path used by `close()`. - Wrap `Service::restore()` with `with_deadline` under `Operation::Restore` (samples into the existing Stat-bucket fallback, consistent with `create_dir` and `presign`). - Wrap the `Composer` in `TailCutWrapper` with a new `oio::Compose` impl covering `compose()` and `close()`; add a dedicated `Operation::Compose` stats slot so compose latencies don't contaminate the Stat fallback bucket. - Add paused-Tokio-time tests covering that a never-resolving `delete()` is cancelled with a temporary `io cancelled by tail cut` error, and that `delete()` records `Operation::Delete` latency samples without relying on `close()`. # Are there any user-facing changes? Yes, bug fix only: `TailCutLayer` now actually applies its deadline and latency tracking to delete, restore and compose operations. Requests that exceed the adaptive deadline now return a temporary error instead of hanging. No API or configuration changes. # Breaking changes # AI Usage Statement - Harness: pi (coding agent harness), delegated via T3 Code - Model: Claude Opus 4.8 (claude-opus-4-8) - Effort: max - Role: Located the bypass, audited all `oio` wrapper impls in the layer, implemented the fix and tests, and ran local verification. The cancel-by-timeout semantics follow the existing `with_io_deadline` pattern used by every other operation in this file. -- 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]
