-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(elasticsearch sink): fix partial retry logic #22431
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
Conversation
- Adjustments of Buffer type definition in Tower 0.5 - As policy is directly modified in Tower 0.5. Removed the policy part in the RetryPolicyFuture. - The change args to mutable for the retry function and clone_request function. It's changed in Tower 0.5. - Changed the RetryPolicyFuture Output to (). This is also changed in Tower 0.5. - Modified some tests as policy is now modified in advance function;
…ls a RetryPartialFunction trait to modify the old request. In the elasticsearch sink. When there are errors in the response, the response's status_codes are keeped in a closure which is later used by the modify_request func in RetryPartialFunction trait.
tower crate to 0.5 and fix partial retry logic
tower crate to 0.5 and fix partial retry logictower crate to v0.5.2 and fix partial retry logic
|
Hi @Serendo, thank you for this PR! I think this is not a breaking change (from the perspective of Vector users). And also we will need a changelog to explain the fix. |
I have added a changlog fragment for this. |
…these stats ranges are related with the test params.
|
Thank you for this @Serendo - excited to see it land in the next release! |
|
Hey @pront . What's still needed here to get this one across the line? Would be great to see it in the next release. |
changelog.d/elasticsearch_sink_skip_retrying_succeeded_documents.feature.md
Outdated
Show resolved
Hide resolved
|
Hi @Serendo, are you still working on this? I see you asked for a review last week but there are still outstanding review comments to be addressed. It would be great to see this feature land so if you need help getting this PR finished my team could help (I work on OSS @G-Research, @tronboto is a colleague of mine). |
Hi @adamreeve, I forgot to push the commits and I thought I had pushed them. I'll push them later. And yes it will be great to get some help from you. Thank you! As you see when modifying the original request, there is a metadata part which is usually generated from the events. But when filtering the requests, I can't use that part of the code as the requests are not in the shape of events now. |
tower crate to v0.5.2 and fix partial retry logic
pront
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more nits
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>
|
Please take a look at the merge conflicts. We will take a look after those are fixed. |
thomasqueirozb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these 2 should be switched, not sure
d9bef7e
|
Thanks for all the work on this 😄 |
Summary
Change Type
Is this a breaking change?
How did you test this PR?
I wrote a python server mocking the elasticsearch bulk api. which will give a response in which the first 5 documents are 201 created, and others are 429. I can see that one particular document will get only one 201.
Does this PR include user facing changes?
Checklist
make check-allis a good command to run locally. This check isdefined here. Some of these
checks might not be relevant to your PR. For Rust changes, at the very least you should run:
cargo fmt --allcargo clippy --workspace --all-targets -- -D warningscargo nextest run --workspace(alternatively, you can runcargo test --all)Cargo.lock), pleaserun
dd-rust-license-tool writeto regenerate the license inventory and commit the changes (if any). More details here.References
Closes: #140
#14891