-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Monitoring] Use op_type = create with ES version >= 7.5.0 #14313
[Monitoring] Use op_type = create with ES version >= 7.5.0 #14313
Conversation
Pinging @elastic/stack-monitoring (Stack monitoring) |
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.
LGTM
"index": meta, | ||
var action common.MapStr | ||
var opType string | ||
if esVersion.LessThan(createDocPrivAvailableESVersion) { |
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.
didn't know about lessThan
make it a lot cleaner.
CI failures look related to this PR. Will investigate and fix. |
I was unable to reproduce the CI failures, specifically the |
jenkins, test this |
Now the error seems to have disappeared from CI too. I want to make sure this is not some kind of flakiness in the test, so I'm going to re-run CI a few times on this PR. |
jenkins, test this |
1 similar comment
jenkins, test this |
Travis CI is green. Jenkins CI is red because of |
…4313) (elastic#14372) * Use op_type = create with ES version >= 7.5.0 * Initialize map * Printing out logs for debugging * Removing debugging logs
Follow up to #13936.
In #13936, we taught the Elasticsearch output client in libbeat to use the
create
op_type in bulk requests to Elasticsearch if the Elasticsearch cluster's version was 7.5.0 or newer. This PR similarly teaches the Elasticsearch monitoring client to do the same.Here's what the bulk request from the monitoring client looks like with Elasticsearch 7.4.0:
And here's what it looks like with Elasticsearch 8.0.0: