-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Do not send default ignore_throttled parameter since it is deprecated #84827
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
Pinging @elastic/es-data-management (Team:Data Management) |
@elasticmachine ok to test |
@wiggzz thanks for the fix. Unfortunately there will be no new release in the Also CheckStyle report code formatting errors: running And finally, can you include the following releases notes in pr: 84827
summary: Do not send default ignore_throttled parameter since it is deprecated
area: Java High Level REST Client
type: bug
issues:
- [] Thanks! |
@swallez done |
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. Thanks again for the fix @wiggzz!
FYI for anyone running into this issue. This fix only works if you have the ignore_throttled flag in your options. We were using the lenient option set that did not have the ignore_throttled option, and were still getting this warning. The code only ignores the flag (i.e. doesn't add it to the rest request) if the flag is set to true, so we had to add the ignore_throttled flag into our indicesOptions options in order to disable it. Reference code in RequestConverters.java: |
Why
When setting indices options in the (now deprecated)
RestHighLevelClient
, even if we do not explicitly setignore_throttled
, the client sends theignore_throttled
parameter to the server. Since 7.16, this parameter is deprecated, and so the server sends back a warning header which is unconditionally logged.This is extremely spammy in our environments because we usually set non-deprecated indices options, and so all of our requests are sending (without our control) the
ignore_throttled
parameter.The
RestHighLevelClient
should not send the deprecatedignore_throttled
parameter unless it is set to the non default value offalse
.What
This PR changes the
RequestConverters
to only send theignore_throttled
parameter when it is set to a non-default value. Otherwise it does not include it.Other notes
Happy to submit this against
master
however this should most definitely be available in the version where the deprecation was introduced (7.16) so I targeted that branch.