apache / opendal

Apache OpenDAL: access data freely.
https://opendal.apache.org
Apache License 2.0
2.99k stars 417 forks source link

idea: Move Concurrent logic out at `Writer` level and adding `write_can_concurrent` #4808

Open Xuanwo opened 1 week ago

Xuanwo commented 1 week ago

We are now repeating concurrent related logic many times. I feel like it's time for us to research how to move concurrent logic out as Writer level as we do for read. Also, we can add write_can_concurrent capability to make sure users can know if a service support concurrent write or not.

One possible idea is making oio::Write::write() returns a 'static future so users can Box::pin() it and join them while needed.

Xuanwo commented 2 days ago

This will be a breaking change. And I will propose an RFC after I figured out most details.