Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): bump OpenDAL to v0.51 #20084

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ icelake = { git = "https://github.com/risingwavelabs/icelake.git", rev = "0ec44f
iceberg = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "683fb89edeaf8d1baae69e1f376d68b92be1d496", features = ["storage-s3", "storage-gcs"] }
iceberg-catalog-rest = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "683fb89edeaf8d1baae69e1f376d68b92be1d496" }
iceberg-catalog-glue = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "683fb89edeaf8d1baae69e1f376d68b92be1d496" }
opendal = "0.49"
opendal = "0.51"
# used only by arrow-udf-flight
arrow-flight = "53"
arrow-udf-js = "0.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use async_trait::async_trait;
use chrono::{DateTime, Utc};
use futures::stream::{self, BoxStream};
use futures::StreamExt;
use opendal::{Metakey, Operator};
use opendal::Operator;
use risingwave_common::types::Timestamptz;

use super::OpendalSource;
Expand Down Expand Up @@ -69,12 +69,7 @@ impl<Src: OpendalSource> OpendalEnumerator<Src> {
pub async fn list(&self) -> ConnectorResult<ObjectMetadataIter> {
let prefix = self.prefix.as_deref().unwrap_or("/");

let object_lister = self
.op
.lister_with(prefix)
.recursive(true)
.metakey(Metakey::ContentLength | Metakey::LastModified)
.await?;
let object_lister = self.op.lister_with(prefix).recursive(true).await?;
let stream = stream::unfold(object_lister, |mut object_lister| async move {
match object_lister.next().await {
Some(Ok(object)) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use futures::{stream, StreamExt};
use opendal::layers::{RetryLayer, TimeoutLayer};
use opendal::raw::BoxedStaticFuture;
use opendal::services::Memory;
use opendal::{Execute, Executor, Metakey, Operator, Writer};
use opendal::{Execute, Executor, Operator, Writer};
use risingwave_common::config::ObjectStoreConfig;
use risingwave_common::range::RangeBoundsExt;
use thiserror_ext::AsReport;
Expand Down Expand Up @@ -227,7 +227,7 @@ impl ObjectStore for OpendalObjectStore {
/// Deletes the objects with the given paths permanently from the storage. If an object
/// specified in the request is not found, it will be considered as successfully deleted.
async fn delete_objects(&self, paths: &[String]) -> ObjectResult<()> {
self.op.remove(paths.to_vec()).await?;
self.op.delete_iter(paths.to_vec()).await?;
Ok(())
}

Expand All @@ -237,11 +237,7 @@ impl ObjectStore for OpendalObjectStore {
start_after: Option<String>,
limit: Option<usize>,
) -> ObjectResult<ObjectMetadataIter> {
let mut object_lister = self
.op
.lister_with(prefix)
.recursive(true)
.metakey(Metakey::ContentLength);
let mut object_lister = self.op.lister_with(prefix).recursive(true);
if let Some(start_after) = start_after {
object_lister = object_lister.start_after(&start_after);
}
Expand Down
2 changes: 1 addition & 1 deletion src/object_store/src/object/opendal_engine/opendal_s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl OpendalObjectStore {
if let Some(nodelay) = config.s3.nodelay.as_ref() {
client_builder = client_builder.tcp_nodelay(*nodelay);
}

#[allow(deprecated)]
Ok(HttpClient::build(client_builder)?)
Comment on lines +111 to 112
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an OpenDAL api? Any non-deprecated substitution?

}

Expand Down
Loading