Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Jan 3, 2024
1 parent 5417d18 commit ebe4d3b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 38 deletions.
17 changes: 10 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 src/connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mysql_common = { version = "0.31", default-features = false, features = [
] }
nexmark = { version = "0.2", features = ["serde"] }
num-bigint = "0.4"
opendal = { git = "https://github.com/apache/incubator-opendal", rev = "9a222e4d72b328a24d5775b1565292f4636bbe69" }
opendal = "0.44"
parking_lot = "0.12"
paste = "1"
prometheus = { version = "0.13", features = ["process"] }
Expand Down
2 changes: 1 addition & 1 deletion src/object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hyper = { version = "0.14", features = ["tcp", "client"] }
hyper-rustls = { version = "0.24.2", features = ["webpki-roots"] }
hyper-tls = "0.5.0"
itertools = "0.12"
opendal = "0.43"
opendal = "0.44"
prometheus = { version = "0.13", features = ["process"] }
risingwave_common = { workspace = true }
rustls = "0.21.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,34 +199,6 @@ impl ObjectStore for OpendalObjectStore {
}
}

impl OpendalObjectStore {
// This function is only used in unit test, as list api will spawn the thread to stat Metakey::ContentLength,
// which will panic in deterministic test.
#[cfg(test)]
async fn list_for_test(&self, prefix: &str) -> ObjectResult<ObjectMetadataIter> {
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)) => {
let key = object.path().to_string();
let last_modified = 0_f64;
let total_size = 0_usize;
let metadata = ObjectMetadata {
key,
last_modified,
total_size,
};
Some((Ok(metadata), object_lister))
}
Some(Err(err)) => Some((Err(err.into()), object_lister)),
None => None,
}
});

Ok(stream.boxed())
}
}

/// Store multiple parts in a map, and concatenate them on finish.
pub struct OpendalStreamingUploader {
Expand Down Expand Up @@ -273,7 +245,7 @@ mod tests {

async fn list_all(prefix: &str, store: &OpendalObjectStore) -> Vec<ObjectMetadata> {
store
.list_for_test(prefix)
.list(prefix)
.await
.unwrap()
.try_collect::<Vec<_>>()
Expand Down

0 comments on commit ebe4d3b

Please sign in to comment.