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

Use bulk deletes where possible #1761

Closed
cmackenzie1 opened this issue Oct 23, 2023 · 1 comment · Fixed by #1763
Closed

Use bulk deletes where possible #1761

cmackenzie1 opened this issue Oct 23, 2023 · 1 comment · Fixed by #1763
Assignees
Labels
enhancement New feature or request

Comments

@cmackenzie1
Copy link
Contributor

Description

Underlying object_store crate has a delete_stream method which if more performant / efficient than calling delete for many files. Where possible, prefer usage of this function.

For example:

let deleted = files_to_delete
.iter_mut()
.map(|file| async move {
match storage.delete(&file.1.location).await {
Ok(_) => Ok(1),
Err(e) => Err(ProtocolError::from(e)),
}
})
.collect::<Vec<_>>();

Use Case

Related Issue(s)

@cmackenzie1 cmackenzie1 added the enhancement New feature or request label Oct 23, 2023
@cmackenzie1
Copy link
Contributor Author

I'll start on this one.

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

Successfully merging a pull request may close this issue.

1 participant