apache / opendal

Apache OpenDAL: One Layer, All Storage.
https://opendal.apache.org
Apache License 2.0
3.45k stars 482 forks source link

feat: Reduce stat operation if we are reading all #5146

Closed Xuanwo closed 1 month ago

Xuanwo commented 1 month ago

Which issue does this PR close?

None

Rationale for this change

We used to perform a stat operation to make sure we have the read size known. But in the read_all cases, we don't need to care about that.

What changes are included in this PR?

This PR refactor the internal range parse logic so that we can read all without fetching it's metadata first.

Are there any user-facing changes?

Xuanwo commented 1 month ago

Thanks a lot for your review!

Thanks for your work! The code LGTM. However, I am not sure if the failed test related with this PR because it has so many lines of log information, it makes me hard to find the specific failed test 😢.