v0.21.0 #1004
Xuanwo
started this conversation in
Announcements
v0.21.0
#1004
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Upgrade to v0.21
v0.21 is an internal refactor version of OpenDAL. In this version, we refactored our error handling and our
AccessorAPIs. 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::Errorwithopendal::Error:And the following error kinds should be updated:
std::io::ErrorKind::NotFound=>opendal::ErrorKind::ObjectNotFoundstd::io::ErrorKind::PermissionDenied=>opendal::ErrorKind::ObjectPermissionDeniedAnd since v0.21, we will return errors
ObjectIsADirectoryandObjectNotADirectoryinstead ofanyhow::Error.Accessor API
In v0.21, we refactor the whole
Accessor's API:Since v0.21, we will return a reply struct for different operations called
RpWriteinstead of an exact type. We can split OpenDAL's public API and raw API with this change.ObjectList and ObjectPage
Since v0.21,
Accessorwill returnObjectPagerforList:And
Objectwill return anObjectListerwhich is built uponObjectPage:ObjectListercan be used as an object stream as before. It also provides the functionnext_pageto get the underlying pages directly:Code Layout
Since v0.21, we have categorized all APIs into
publicandraw.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::*andopendal::http_util::*toopendal::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: v0.20.1...v0.21.0
This discussion was created from the release v0.21.0.
Beta Was this translation helpful? Give feedback.
All reactions