Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readers: Allow config prefetch size #31

Merged
merged 1 commit into from
Feb 18, 2022
Merged

readers: Allow config prefetch size #31

merged 1 commit into from
Feb 18, 2022

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Feb 18, 2022

Signed-off-by: Xuanwo github@xuanwo.io

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/.

Summary

The default prefetch may not be suitable for every use case. Allowing config prefetch size will make the seekable reader more tunable.

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo merged commit 29c8891 into main Feb 18, 2022
@Xuanwo Xuanwo deleted the prefetch branch February 18, 2022 04:46
use futures::io::BufReader;
use futures::io::Cursor;
use futures::{io, AsyncSeekExt};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the code style same as other repos style?
Such as databend:
https://github.com/datafuselabs/databend/blob/main/rustfmt.toml

There is no standard here, but defined a style may be important for the contributor to follow :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to add imports_granularity = "Item", but it requires nightly rustfmt. And opendal is designed to be used in stable rust 😢

I will fix those styles by hand for now and keep the rustfmt.toml the same with other repos once those options are ready.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants