opendal

Apache OpenDAL: access data freely.

APACHE-2.0 License

Downloads
16.2K
Stars
3.1K
Committers
226

Bot releases are visible (Hide)

opendal - v0.22.2

Published by Xuanwo almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.1...v0.22.2

opendal - v0.22.1

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.0...v0.22.1

opendal - v0.22.0

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.21.2...v0.22.0

opendal - v0.21.2

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.21.1...v0.21.2

opendal - v0.21.1

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.21.0...v0.21.1

opendal - v0.21.0

Published by Xuanwo almost 2 years ago

Upgrade to v0.21

v0.21 is an internal refactor version of OpenDAL. In this version, we refactored our error handling and our Accessor APIs. Thanks to those internal changes, we added an object-level metadata cache, making it nearly zero cost to reuse existing metadata continuously.

Let's start with our errors.

Error Handling

As described in RFC-0977: Refactor Error, we refactor opendal error by a new error
called opendal::Error.

This change will affect all APIs that are used to return io::Error.

To migrate this, please replace std::io::Error with opendal::Error:

- use std::io::Result;
+ use opendal::Result;

And the following error kinds should be updated:

  • std::io::ErrorKind::NotFound => opendal::ErrorKind::ObjectNotFound
  • std::io::ErrorKind::PermissionDenied => opendal::ErrorKind::ObjectPermissionDenied

And since v0.21, we will return errors ObjectIsADirectory and ObjectNotADirectory instead of anyhow::Error.

Accessor API

In v0.21, we refactor the whole Accessor's API:

- async fn write(&self, path: &str, args: OpWrite, r: BytesReader) -> Result<u64>
+ async fn write(&self, path: &str, args: OpWrite, r: BytesReader) -> Result<RpWrite>

Since v0.21, we will return a reply struct for different operations called RpWrite instead of an exact type. We can split OpenDAL's public API and raw API with this change.

ObjectList and ObjectPage

Since v0.21, Accessor will return ObjectPager for List:

- async fn list(&self, path: &str, args: OpList) -> Result<ObjectStreamer>
+ async fn list(&self, path: &str, args: OpList) -> Result<(RpList, ObjectPager)>

And Object will return an ObjectLister which is built upon ObjectPage:

pub async fn list(&self) -> Result<ObjectLister> { ... }

ObjectLister can be used as an object stream as before. It also provides the function next_page to get the underlying pages directly:

impl ObjectLister {
    pub async fn next_page(&mut self) -> Result<Option<Vec<Object>>>;
}

Code Layout

Since v0.21, we have categorized all APIs into public and raw.

Public APIs are exposed under opendal::Xxx; they are user-face APIs that are easy to use and understand.

Raw APIs are exposed under opendal::raw::Xxx; they are implementation details for underlying services and layers.

Please replace all usage of opendal::io_util::* and opendal::http_util::* to opendal::raw::* instead.

With this change, new users of OpenDAL maybe be it easier to get started.

Summary

Sorry for introducing too much breaking change in a single version. This version can be a solid version for preparing OpenDAL v1.0.

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.20.1...v0.21.0

opendal - v0.20.1

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.20.0...v0.20.1

opendal - v0.20.0

Published by Xuanwo almost 2 years ago

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

New Contributors

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.8...v0.20.0

opendal - v0.19.8

Published by Xuanwo almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.7...v0.19.8

opendal - v0.19.7

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.6...v0.19.7

opendal - v0.19.6

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.5...v0.19.6

opendal - v0.19.5

Published by Xuanwo almost 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.4...v0.19.5

opendal - v0.19.4

Published by Xuanwo about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.3...v0.19.4

opendal - v0.19.3

Published by Xuanwo about 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.2...v0.19.3

opendal - v0.19.2

Published by Xuanwo about 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.1...v0.19.2

opendal - v0.19.1

Published by Xuanwo about 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.19.0...v0.19.1

opendal - v0.19.0

Published by Xuanwo about 2 years ago

Upgrade to v0.19

OpenDAL deprecate some features:

  • serde: We will enable it by default.
  • layers-retry: We will enable retry support by default.
  • layers-metadata-cache: We will enable it by default.

Deprecated types like DirEntry has been removed.


What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.18.2...v0.19.0

opendal - v0.18.2

Published by Xuanwo about 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.18.1...v0.18.2

opendal - v0.18.1

Published by Xuanwo about 2 years ago

What's Changed

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.18.0...v0.18.1

opendal - v0.18.0

Published by Xuanwo about 2 years ago

Upgrade to v0.18

OpenDAL v0.18 introduces the following breaking changes:

  • Deprecated feature flag services-http has been removed.
  • All DirXxx items have been renamed to ObjectXxx to make them more consistent.
    • DirEntry -> ObjectEntry
    • DirStream -> ObjectStream
    • DirStreamer -> ObjectStream
    • DirIterate -> ObjectIterate
    • DirIterator -> ObjectIterator

Besides, we also make a big change to our ObjectEntry API. Since v0.18, we can fully reuse the metadata that fetched during list. Take entry.content_length() for example:

  • If content_lenght is already known, we will return directly.
  • If not, we will check if the object entry is complete:
    • If complete, the entry already fetched all metadata that it could have, return directly.
    • If not, we will send a stat call to get the metadata and refresh our cache.

This change means:

  • All API like content_length will be changed into async functions.
  • metadata and blocking_metadata will not return errors anymore.
  • To retrieve the latest meta, please use entry.into_object().metadata() instead.

What's Changed

New Contributors

Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.17.4...v0.18.0