Skip to content

RFC-0599: Blocking API #599

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

Merged
merged 5 commits into from
Aug 30, 2022
Merged

RFC-0599: Blocking API #599

merged 5 commits into from
Aug 30, 2022

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Aug 30, 2022

Signed-off-by: Xuanwo [email protected]

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

Summary

Rendered

Signed-off-by: Xuanwo <[email protected]>
@Xuanwo Xuanwo requested review from ClSlaid and dantengsky August 30, 2022 09:21
@Xuanwo Xuanwo changed the title RFC: Blocking API RFC-0599: Blocking API Aug 30, 2022
Signed-off-by: Xuanwo <[email protected]>
Copy link
Contributor

@ClSlaid ClSlaid left a comment

Choose a reason for hiding this comment

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

Can we use blocking IO functions in local fs services to implement Accessor's asynchronous functions directly? What is the drawback of our current non-blocking API?

@Xuanwo
Copy link
Member Author

Xuanwo commented Aug 30, 2022

Can we just use blocking IO functions in local fs services if they are much faster than the tokio::fs functions?

We can't run blocking IO functions inside the async context. We need to let the local thread pool execute them and use mio to listen to the events. If we do so, congrats, we are building tokio::fs again!


This is a good question, I will add into RFC.

Copy link
Contributor

@ClSlaid ClSlaid left a comment

Choose a reason for hiding this comment

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

Keeping 2 sets of APIs is prefered.

Signed-off-by: Xuanwo <[email protected]>
Copy link

@dantengsky dantengsky left a comment

Choose a reason for hiding this comment

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

LGTM

@Xuanwo Xuanwo merged commit 5ad7b7d into main Aug 30, 2022
@Xuanwo Xuanwo deleted the blocking_api branch August 30, 2022 10:24
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.

3 participants