You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2024/03/29 09:22:16 UTC
(opendal) 01/01: chore: Remove not exist read operations
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch cleanup-oio-read
in repository https://gitbox.apache.org/repos/asf/opendal.git
commit f8ed0b9e10b54078488f9759023887266e528cda
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Fri Mar 29 17:21:58 2024 +0800
chore: Remove not exist read operations
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
core/src/layers/retry.rs | 2 +-
core/src/raw/oio/read/api.rs | 9 ---------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/core/src/layers/retry.rs b/core/src/layers/retry.rs
index 853bde80a8..eca63d61cf 100644
--- a/core/src/layers/retry.rs
+++ b/core/src/layers/retry.rs
@@ -676,7 +676,7 @@ impl<R: oio::Read, I: RetryInterceptor> oio::Read for RetryWrapper<R, I> {
err,
dur,
&[
- ("operation", ReadOperation::Seek.into_static()),
+ ("operation", ReadOperation::Read.into_static()),
("path", &self.path),
],
)
diff --git a/core/src/raw/oio/read/api.rs b/core/src/raw/oio/read/api.rs
index 4351483489..1feb44f16a 100644
--- a/core/src/raw/oio/read/api.rs
+++ b/core/src/raw/oio/read/api.rs
@@ -31,14 +31,8 @@ use crate::*;
pub enum ReadOperation {
/// Operation for [`Read::read`]
Read,
- /// Operation for [`Read::seek`]
- Seek,
/// Operation for [`BlockingRead::read`]
BlockingRead,
- /// Operation for [`BlockingRead::seek`]
- BlockingSeek,
- /// Operation for [`BlockingRead::next`]
- BlockingNext,
}
impl ReadOperation {
@@ -60,10 +54,7 @@ impl From<ReadOperation> for &'static str {
match v {
Read => "Reader::read",
- Seek => "Reader::seek",
BlockingRead => "BlockingReader::read",
- BlockingSeek => "BlockingReader::seek",
- BlockingNext => "BlockingReader::next",
}
}
}