mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 08:50:40 +00:00
chore: Bump OpenDAL to v0.36 (#1678)
* chore: Bump OpenDAL to v0.36 Signed-off-by: Xuanwo <github@xuanwo.io> * Fix Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
@@ -37,7 +37,6 @@ futures-util.workspace = true
|
||||
key-lock = "0.1"
|
||||
hyper = { version = "0.14", features = ["full"] }
|
||||
humantime-serde = "1.1"
|
||||
log = "0.4"
|
||||
log-store = { path = "../log-store" }
|
||||
meta-client = { path = "../meta-client" }
|
||||
meta-srv = { path = "../meta-srv", features = ["mock"] }
|
||||
|
||||
@@ -56,7 +56,8 @@ pub(crate) async fn new_object_store(store_config: &ObjectStoreConfig) -> Result
|
||||
LoggingLayer::default()
|
||||
// Print the expected error only in DEBUG level.
|
||||
// See https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html#method.with_error_level
|
||||
.with_error_level(Some(log::Level::Debug)),
|
||||
.with_error_level(Some("debug"))
|
||||
.expect("input error level must be valid"),
|
||||
)
|
||||
.layer(TracingLayer))
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ bytes = "1.4"
|
||||
futures = { version = "0.3" }
|
||||
md5 = "0.7"
|
||||
metrics.workspace = true
|
||||
opendal = { version = "0.33", features = ["layers-tracing", "layers-metrics"] }
|
||||
opendal = { version = "0.36", features = ["layers-tracing", "layers-metrics"] }
|
||||
pin-project = "1.0"
|
||||
tokio.workspace = true
|
||||
|
||||
|
||||
@@ -19,9 +19,11 @@ use std::sync::Arc;
|
||||
use async_trait::async_trait;
|
||||
use lru::LruCache;
|
||||
use metrics::increment_counter;
|
||||
use opendal::ops::{OpDelete, OpList, OpRead, OpScan, OpWrite};
|
||||
use opendal::raw::oio::{Page, Read, Reader, Write};
|
||||
use opendal::raw::{Accessor, Layer, LayeredAccessor, RpDelete, RpList, RpRead, RpScan, RpWrite};
|
||||
use opendal::raw::{
|
||||
Accessor, Layer, LayeredAccessor, OpAppend, OpDelete, OpList, OpRead, OpWrite, RpAppend,
|
||||
RpDelete, RpList, RpRead, RpWrite,
|
||||
};
|
||||
use opendal::{ErrorKind, Result};
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
@@ -108,6 +110,7 @@ impl<I: Accessor, C: Accessor> LayeredAccessor for LruCacheAccessor<I, C> {
|
||||
type BlockingWriter = I::BlockingWriter;
|
||||
type Pager = I::Pager;
|
||||
type BlockingPager = I::BlockingPager;
|
||||
type Appender = I::Appender;
|
||||
|
||||
fn inner(&self) -> &Self::Inner {
|
||||
&self.inner
|
||||
@@ -167,6 +170,10 @@ impl<I: Accessor, C: Accessor> LayeredAccessor for LruCacheAccessor<I, C> {
|
||||
self.inner.write(path, args).await
|
||||
}
|
||||
|
||||
async fn append(&self, path: &str, args: OpAppend) -> Result<(RpAppend, Self::Appender)> {
|
||||
self.inner.append(path, args).await
|
||||
}
|
||||
|
||||
async fn delete(&self, path: &str, args: OpDelete) -> Result<RpDelete> {
|
||||
let cache_path = md5::compute(path);
|
||||
let lru_cache = &self.lru_cache;
|
||||
@@ -194,10 +201,6 @@ impl<I: Accessor, C: Accessor> LayeredAccessor for LruCacheAccessor<I, C> {
|
||||
self.inner.list(path, args).await
|
||||
}
|
||||
|
||||
async fn scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::Pager)> {
|
||||
self.inner.scan(path, args).await
|
||||
}
|
||||
|
||||
fn blocking_read(&self, path: &str, args: OpRead) -> Result<(RpRead, Self::BlockingReader)> {
|
||||
self.inner.blocking_read(path, args)
|
||||
}
|
||||
@@ -209,10 +212,6 @@ impl<I: Accessor, C: Accessor> LayeredAccessor for LruCacheAccessor<I, C> {
|
||||
fn blocking_list(&self, path: &str, args: OpList) -> Result<(RpList, Self::BlockingPager)> {
|
||||
self.inner.blocking_list(path, args)
|
||||
}
|
||||
|
||||
fn blocking_scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::BlockingPager)> {
|
||||
self.inner.blocking_scan(path, args)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user