-
Notifications
You must be signed in to change notification settings - Fork 726
fix: keep track of indexSlice explicitly in bulk helper response handling loop #1759
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
fix: keep track of indexSlice explicitly in bulk helper response handling loop #1759
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
@karlriis Thanks for this fix! can you rebase it against latest |
@JoshMock Thanks, rebased against latest main now |
jenkins test this |
buildkite test this |
@JoshMock any updates on getting this over the line? |
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.
Sorry for the delay @karlriis! This looks right. Merging, and will add a test to verify the change. 😎
jenkins test this |
Tests are failing on Node 14.x for unrelated reasons that I can fix elsewhere. (14.x is also EOL but we'll address that in #1855.) |
…ling loop (#1759) Co-authored-by: Josh Mock <[email protected]>
…ling loop (#1759) Co-authored-by: Josh Mock <[email protected]>
…r response handling loop (#1759) (#1903) Co-authored-by: Karl Riis <[email protected]>
Closes #1751
Fixes the aforementioned issue where a bulk helper call can return wrong information about the erroring operation/document via
onDrop()
, or cause a deserialization error when the request contains a delete action combined with any other action.The fix is to keep track of
indexSlice
separately in the response handling loop of thetryBulk
method, instead of deriving it based on the loop counter. The previous approach didn't account for different types of operations which were handled in previous iterations of the loop.