feat(layers/timeout): refactor timeout logic to be internal to the layer#7179
Open
dheeraj12347 wants to merge 1 commit intoapache:mainfrom
Open
feat(layers/timeout): refactor timeout logic to be internal to the layer#7179dheeraj12347 wants to merge 1 commit intoapache:mainfrom
dheeraj12347 wants to merge 1 commit intoapache:mainfrom
Conversation
Author
|
I've noticed several failures in the Behavior Tests (Node.js/Python) and the Ocaml documentation build. Since my changes are strictly encapsulated within the Rust TimeoutLayer and do not modify any core ops or bindings, I suspect these are flaky tests or CI-specific issues. Could a maintainer please help verify if a re-run is needed? |
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.
This PR is a complete refactor of the TimeoutLayer to address the architectural feedback from my previous attempt in #7176.
The Problem: My previous PR attempted to add timeout parameters to the operation arguments (ops), which leaked layer logic into the core.
The Solution: This version uses the Decorator pattern to wrap the futures directly within the TimeoutAccessor and TimeoutWrapper.
Key Changes:
Encapsulation: All tokio::time::timeout logic is now internal to the layer.
Zero Core Changes: No modifications were made to opendal_core::raw::ops.
Standardized Errors: Timeout errors now include duration context and are marked as temporary to support retry layers.
Verified: Included unit tests to confirm that operation timeouts trigger correctly.
I would appreciate a fresh review of this approach.