From 44e93563227e58520f07e0ebcf3be14601b59d9a Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 17 Nov 2022 20:39:01 +0800 Subject: [PATCH] Bump to version 0.20.0 (#961) * Bump to version 0.20.0 Signed-off-by: Xuanwo * Fix build Signed-off-by: Xuanwo Signed-off-by: Xuanwo --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- docs/upgrade.md | 28 ++++++++++++++++++++++++++++ oay/Cargo.lock | 7 +++---- oay/Cargo.toml | 2 +- oli/Cargo.lock | 41 +++-------------------------------------- oli/Cargo.toml | 2 +- 7 files changed, 72 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80cd5a1c35b8..75810fa4e851 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,20 +5,51 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +## [v0.20.0] - 2022-11-17 + +### Added + +- RFC-0926: Object Reader (#926) +- feat: Implement Object Reader (#928) +- feat(services/s3): Return Object Meta for Read operation (#932) +- feat: Implement Bytes Content Range (#933) +- feat: Add Content Range support in ObjectMetadata (#935) +- feat(layers/content_cache): Implement WholeCacheReader (#936) +- feat: CompressAlgorithm derive serde. (#939) +- feat: Allow using opendal without tls support (#945) +- refactor: Refactor OpRead with BytesRange (#946) +- feat: Allow using opendal with native tls support (#949) +- docs: add docs for tls dependencies features (#951) +- feat: Make ObjectReader content_length returned for all services (#954) +- feat(layers): Implement fixed content cache (#953) +- feat: Enable default_ttl support for redis (#960) + +### Changed + +- refactor: Return ObjectReader in Accessor::read (#929) +- refactor(oay,oli): drop unnecessary patch.crates-io from `Cargo.toml` +- refactor: Polish bytes range (#950) +- refactor: Use simplifed kv adapter instead (#959) + +### Fixed + +- fix(ops): Fix suffix range behavior of bytes range (#942) +- fix: Fix cache path not used correctly (#958) + ## [v0.19.8] - 2022-11-13 -## Added +### Added - feat(services/moka): Use entry's bytes as capacity weigher (#914) - feat: Implement rocksdb service (#913) -## Changed +### Changed - refactor: Reduce backend builder log level to debug (#907) - refactor: Remove deprecated features (#920) - refactor: use moka::sync::SegmentedCache (#921) -## Fixed +### Fixed - fix(http): Check already read size before returning (#919) @@ -938,6 +969,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). Hello, OpenDAL! +[v0.20.0]: https://github.com/datafuselabs/opendal/compare/v0.19.8...v0.20.0 [v0.19.8]: https://github.com/datafuselabs/opendal/compare/v0.19.7...v0.19.8 [v0.19.7]: https://github.com/datafuselabs/opendal/compare/v0.19.6...v0.19.7 [v0.19.6]: https://github.com/datafuselabs/opendal/compare/v0.19.5...v0.19.6 diff --git a/Cargo.toml b/Cargo.toml index 9b54fc895f70..c1f23de6a239 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["storage", "fs", "s3", "azblob", "gcs"] license = "Apache-2.0" name = "opendal" repository = "https://github.com/datafuselabs/opendal" -version = "0.19.8" +version = "0.20.0" [package.metadata.docs.rs] all-features = true diff --git a/docs/upgrade.md b/docs/upgrade.md index 65cfac25dd72..f1e730e6d90b 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -2,6 +2,34 @@ This document intends to record upgrade and migrate procedures while OpenDAL meets breaking changes. +## Upgrade to v0.20 + +v0.20 is a big release that we introduce a lot of performance related changes. + +To make the best of information from `read` operation, we propose and implemented [RFC-0926: Object Reader](https://opendal.databend.rs/rfcs/0926-object-reader.html). By this RFC, we can fetch content length from `ObjectReader` now! + +```rust +pub struct ObjectReader { + inner: BytesReader + meta: ObjectMetadata, +} + +impl ObjectReader { + pub fn content_length(&self) -> u64 {} + pub fn last_modified(&self) -> Option {} + pub fn etag(&self) -> Option {} +} +``` + +To make this happen, we changed our `Accessor` API: + +```diff +- async fn read(&self, path: &str, args: OpRead) -> Result {} ++ async fn read(&self, path: &str, args: OpRead) -> Result {} +``` + +All layers should be updated to meet this change. Also, it's required to return `content_length` while building `ObjectReader`. Please make sure the returning `ObjectMetadata` is used correctly. + ## Upgrade to v0.19 OpenDAL deprecate some features: diff --git a/oay/Cargo.lock b/oay/Cargo.lock index a3e152159a5e..6f63dd756645 100644 --- a/oay/Cargo.lock +++ b/oay/Cargo.lock @@ -1086,7 +1086,7 @@ checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opendal" -version = "0.19.8" +version = "0.20.0" dependencies = [ "anyhow", "async-compat", @@ -1316,9 +1316,9 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "reqsign" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d2652b3541e4286c00ef536de54feda4c129af5b4d9ae05ece70ce61b0cade" +checksum = "e22524be78041476bf8673f2720fa1000f34432b384d9ad5846b024569a4b150" dependencies = [ "anyhow", "backon", @@ -1875,7 +1875,6 @@ checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" dependencies = [ "base64", "chunked_transfer", - "flate2", "log", "once_cell", "rustls", diff --git a/oay/Cargo.toml b/oay/Cargo.toml index be759c339cd8..ae2373e7efcf 100644 --- a/oay/Cargo.toml +++ b/oay/Cargo.toml @@ -17,7 +17,7 @@ clap = { version = "4", features = ["cargo"] } env_logger = "0.9" futures = "0.3" log = "0.4" -opendal = { version = "0.19", path = "../" } +opendal = { version = "0.20", path = "../" } percent-encoding = "2" sluice = "0.5" tokio = { version = "1.20", features = ["rt-multi-thread", "macros"] } diff --git a/oli/Cargo.lock b/oli/Cargo.lock index f26faa8250c1..f74c648814df 100644 --- a/oli/Cargo.lock +++ b/oli/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "ahash" version = "0.7.6" @@ -230,15 +224,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -332,16 +317,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499" -[[package]] -name = "flate2" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "float-cmp" version = "0.9.0" @@ -731,15 +706,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "miniz_oxide" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" -dependencies = [ - "adler", -] - [[package]] name = "mio" version = "0.8.5" @@ -829,7 +795,7 @@ checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opendal" -version = "0.19.7" +version = "0.20.0" dependencies = [ "anyhow", "async-compat", @@ -1089,9 +1055,9 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "reqsign" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d2652b3541e4286c00ef536de54feda4c129af5b4d9ae05ece70ce61b0cade" +checksum = "e22524be78041476bf8673f2720fa1000f34432b384d9ad5846b024569a4b150" dependencies = [ "anyhow", "backon", @@ -1616,7 +1582,6 @@ checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" dependencies = [ "base64", "chunked_transfer", - "flate2", "log", "once_cell", "rustls", diff --git a/oli/Cargo.toml b/oli/Cargo.toml index 215cbd8355f6..f503b686c6d0 100644 --- a/oli/Cargo.toml +++ b/oli/Cargo.toml @@ -15,7 +15,7 @@ anyhow = "1" clap = { version = "4", features = ["cargo", "string"] } env_logger = "0.9" log = "0.4" -opendal = { version = "0.19", path = "../" } +opendal = { version = "0.20", path = "../" } tokio = { version = "1.20", features = ["fs", "macros", "rt-multi-thread"] } [dev-dependencies]