Skip to content

Conversation

@kares
Copy link
Contributor

@kares kares commented Mar 4, 2021

we've seen some weird behavior on ES 7.10.2 (but also with 7.11.1) where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly NoMethodError: undefined method ``[]' for nil:NilClass

resolves #989

kares added 3 commits March 4, 2021 10:10
we've seen some weird behavior on ES 7.10.2 where a _bulk request to
index 69 documents returned 135 entries

this leads to an ugly
`NoMethodError: undefined method ``[]' for nil:NilClass`

resolves logstash-plugins#989
@kares kares marked this pull request as ready for review March 4, 2021 09:16
@kaisecheng kaisecheng self-requested a review March 4, 2021 10:00
Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

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

LGTM! I left minor feedback on the comment. Feel free to merge

end

responses = bulk_response["items"]
if responses.size != actions.size # can not map action -> response reliably
Copy link
Contributor

Choose a reason for hiding this comment

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

could be more explicit in the comment saying
"to deal with weird behavior on ES 7.10.2, 7.11.1 where a _bulk request to
index X documents returned X+Y entries"

@kares kares merged commit 9401759 into logstash-plugins:master Mar 4, 2021
kares added a commit to kares/logstash-output-elasticsearch that referenced this pull request Mar 4, 2021
* master:
  Feat: assert returned item count from _bulk (logstash-plugins#997)
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.

add an assert to check returned item count from _bulk

3 participants