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. By this RFC, we can fetch content length from ObjectReader
now!
pub struct ObjectReader {
inner: BytesReader
meta: ObjectMetadata,
}
impl ObjectReader {
pub fn content_length(&self) -> u64 {}
pub fn last_modified(&self) -> Option<OffsetDateTime> {}
pub fn etag(&self) -> Option<String> {}
}
To make this happen, we changed our Accessor
API:
- async fn read(&self, path: &str, args: OpRead) -> Result<BytesReader> {}
+ async fn read(&self, path: &str, args: OpRead) -> Result<ObjectReader> {}
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.
What's Changed
- RFC-0926: Object Reader by @Xuanwo in #926
- feat: Implement Object Reader by @Xuanwo in #928
- refactor: Return ObjectReader in Accessor::read by @Xuanwo in #929
- feat(services/s3): Return Object Meta for Read operation by @Xuanwo in #932
- feat: Implement Bytes Content Range by @Xuanwo in #933
- feat: Add Content Range support in ObjectMetadata by @Xuanwo in #935
- feat(layers/content_cache): Implement WholeCacheReader by @Xuanwo in #936
- feat: CompressAlgorithm derive serde. by @youngsofun in #939
- fix(ops): Fix suffix range behavior of bytes range by @Xuanwo in #942
- refactor(oay,oli): drop unnecessary
patch.crates-io
fromCargo.toml
by @messense in #944 - feat: Allow using opendal without tls support by @messense in #945
- refactor: Refactor OpRead with BytesRange by @Xuanwo in #946
- feat: Allow using opendal with native tls support by @messense in #949
- docs: add docs for tls dependencies features by @messense in #951
- refactor: Polish bytes range by @Xuanwo in #950
- feat: Make ObjectReader content_length returned for all services by @Xuanwo in #954
- feat(layers): Implement fixed content cache by @Xuanwo in #953
- fix: Fix cache path not used correctly by @Xuanwo in #958
- refactor: Use simplifed kv adapter instead by @Xuanwo in #959
- feat: Enable default_ttl support for redis by @Xuanwo in #960
- Bump to version 0.20.0 by @Xuanwo in #961
New Contributors
Full Changelog: v0.19.8...v0.20.0