new feature: provide timeout for each operation
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
### Feature Description
Hi team, I notice we have timeout for all operations via timeout layer: https://opendal.apache.org/docs/rust/opendal/layers/struct.TimeoutLayer.html
I would like to know whether you experts think it makes sense to provide per-operation timeout feature?
For example,
- `list` operation usually does range query, and should be expectedly taking more time than point query `stat` call
- `read` request could potentially be served with [cache](https://docs.cloud.google.com/storage/docs/caching) and don't go through any data persistent layer, while it's non-avoidable for write operations
For now, I do have workarounds to use multiple operators for different type of operations, I'm just wondering if you think the per-operation timeout makes sense, or if it's already supported somehow?
### Problem and Solution
One potential way is to provide a config which contains different timeouts for each operations to override global `timeout` and `io_timeout`.
### Additional Context
_No response_
### Are you willing to contribute to the development of this feature?
- [ ] Yes, I am willing to contribute to the development of this feature.
Contributor guide
Research direction
Start by reviewing the existing TimeoutLayer documentation and the global timeout and io_timeout behavior described in the issue. Determine whether per-operation configuration is needed beyond using multiple operators, and document a decided scope and expected behavior for list, stat, read, and write operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100