v0.27.0
版本发布时间: 2023-02-11 15:23:31
apache/opendal最新发布版本:v0.49.2(2024-08-29 15:40:35)
Upgrade to v0.27
In v0.27, we refactored our list
related logic and added scan
support. So make Pager
and BlockingPager
associated types in Accessor
too!
pub trait Accessor: Send + Sync + Debug + Unpin + 'static {
type Reader: output::Read;
type BlockingReader: output::BlockingRead;
+ type Pager: output::Page;
+ type BlockingPager: output::BlockingPage;
}
User defined layers
Due to this change, all layers implementation should be changed. If there is not changed over pager, they can by changed like the following:
impl<A: Accessor> LayeredAccessor for MyAccessor<A> {
type Inner = A;
type Reader = MyReader<A::Reader>;
type BlockingReader = MyReader<A::BlockingReader>;
+ type Pager = A::Pager;
+ type BlockingPager = A::BlockingPager;
+ async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Pager)> {
+ self.inner.list(path, args).await
+ }
+ async fn scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::Pager)> {
+ self.inner.scan(path, args).await
+ }
+ fn blocking_list(&self, path: &str, args: OpList) -> Result<(RpList, Self::BlockingPager)> {
+ self.inner.blocking_list(path, args)
+ }
+ fn blocking_scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::BlockingPager)> {
+ self.inner.blocking_scan(path, args)
+ }
}
Usage of ops
To reduce the understanding overhead, we move all OpXxx
into opendal::ops
now. User may need to change:
- use opendal::OpWrite;
+ use opendal::ops::OpWrite;
Usage of RetryLayer
backon
is the implementation detail of our RetryLayer
, so we hide it from our public API. Users of RetryLayer
need to change the code like:
- RetryLayer::new(backon::ExponentialBackoff::default())
+ RetryLayer::new()
What's Changed
- ci: Fix dev container Dockerfile by @PsiACE in https://github.com/datafuselabs/opendal/pull/1298
- fix: Rocksdb's scheme not output correctly by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1300
- refactor: Hide backon from our public API by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1302
- refactor: Don't expose ops structs to users directly by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1303
- feat: Add Retryable Pager Support by @ClSlaid in https://github.com/datafuselabs/opendal/pull/1304
- refactor: Move and rename ObjectPager and ObjectEntry for more clear semantics by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1308
- refactor: Implement strong typed pager by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1311
- feat: Add Sled support by @jkleinknox in https://github.com/datafuselabs/opendal/pull/1305
- chore: fix name typo in oss backend by @wcy-fdu in https://github.com/datafuselabs/opendal/pull/1316
- feat: Add Object::scan() support by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1314
- feat: Add object page size support by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1318
- chore: Add typos-cli and fix typos by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1320
- deps: remove unused deps by @xxchan in https://github.com/datafuselabs/opendal/pull/1321
- docs: Add risingwave in projects by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1322
- refactor: Extract scan as a new API and remove ListStyle by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1324
- Bump to version 0.27 by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1325
New Contributors
- @jkleinknox made their first contribution in https://github.com/datafuselabs/opendal/pull/1305
- @wcy-fdu made their first contribution in https://github.com/datafuselabs/opendal/pull/1316
- @xxchan made their first contribution in https://github.com/datafuselabs/opendal/pull/1321
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.26.2...v0.27.0