apache / opendal

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

Tracking issues of RFC-3911: Deleter API #3922

Open Xuanwo opened 10 months ago

Xuanwo commented 10 months ago

Tasks

howiieyu commented 10 months ago

If I understand correctly, there are a few typos in the RFC.

L37 in RFC text.

+  pub async fn delete_with(&self, path: &str) -> FutureDelete;

delete_with already return Future, async keyword is not necessary.

L40 in RFC text.

+  pub async fn deleter_with(&self) -> FutureDeleter;

same as above.

L99 in RFC text.

let deleter = op.deleter()
  // Allow up to 8 concurrent delete tasks, default to 1.
  .concurrent(8)
  // Configure the buffer size to 1000, default value provided by services.
  .buffer(1000)
  .await?;

// Add a single file to the deleter.
deleter.delete(path).await?;

// Add a stream of files to the deleter.
deleter.delete_all(&mut lister).await?;

// Close deleter, make sure all input files are deleted.
deleter.close().await?;

op.deleter() should be op.deleter_with()

Xuanwo commented 10 months ago

Thanks a lot! Would you like to submit a PR to fix them all?