-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove the deprecated local parameter for _cat/shards #64867
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
Remove the deprecated local parameter for _cat/shards #64867
Conversation
|
Pinging @elastic/es-core-features (:Core/Features/CAT APIs) |
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 left a comment related to this
| if (request.hasParam("local") && Version.CURRENT.major == Version.V_7_0_0.major + 1) { | ||
| throw new IllegalArgumentException("parameter [local] is not supported"); |
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.
You don't need to add this I believe, we automatically throw exceptions on unrecognized parameters:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "request [/_cat/shards] contains unrecognized parameter: [aoeu]"
}
],
"type" : "illegal_argument_exception",
"reason" : "request [/_cat/shards] contains unrecognized parameter: [aoeu]"
},
"status" : 400
}
|
@elasticmachine update branch |
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, @dakrone! |
The cat shards API performs a
ClusterStateActionand then anIndicesStatsAction. Today it accepts the?localparameter and passes this to theClusterStateActionbut this parameter has no effect on theIndicesStatsAction. This can be surprising becauseGET _cat/shards?locallooks like it might be a completely local call but in fact it still depends on every node in the cluster.The
localparameter was deprecated in 7.x (#62197) and this commit removes it for 8.x.