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

Parallelize S3 delete objects requests #5535

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guilload
Copy link
Member

@guilload guilload commented Nov 1, 2024

Description

Parallelize S3 delete objects requests

How was this PR tested?

Ran quickwit-storage test suite locally.

Copy link

github-actions bot commented Nov 1, 2024

On SSD:

Average search latency is 0.994x that of the reference (lower is better).
Ref run id: 4101, ref commit: 70a248b
Link

On GCS:

Average search latency is 0.998x that of the reference (lower is better).
Ref run id: 4102, ref commit: 70a248b
Link

Copy link
Contributor

@trinity-1686a trinity-1686a left a comment

Choose a reason for hiding this comment

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

some non-blocking observations on lifetime&async, and atomic ordering


impl CancellationToken {
fn cancel(&self) {
self.0.store(true, Ordering::Release);
Copy link
Contributor

Choose a reason for hiding this comment

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

this access can be Relaxed, we're only interested in how the memory address changes over time, not to how its changes relate to changes in the rest of the memory of our program

}

fn is_cancelled(&self) -> bool {
self.0.load(Ordering::Acquire)
Copy link
Contributor

Choose a reason for hiding this comment

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

same wrt Relaxed

Comment on lines +625 to +627
let bucket = self.bucket.clone();
let retry_params = self.retry_params;
let cancellation_token = cancellation_token.clone();
Copy link
Contributor

Choose a reason for hiding this comment

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

because of how this code is written (structured concurrency vs the more usual tokio::spawn), bucket and cancellation_token need not be cloned, refs are enough (and CancellationToken could be made to not have an inner Arc)

i don't know if it should be done that way, but it certainly can

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.

2 participants