Remove the deprecated local parameter for _cat/shards#64867
Merged
danhermann merged 3 commits intoelastic:masterfrom Nov 13, 2020
Merged
Remove the deprecated local parameter for _cat/shards#64867danhermann merged 3 commits intoelastic:masterfrom
danhermann merged 3 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/CAT APIs) |
dakrone
reviewed
Nov 10, 2020
Member
dakrone
left a comment
There was a problem hiding this comment.
I left a comment related to this
Comment on lines
+92
to
+93
| if (request.hasParam("local") && Version.CURRENT.major == Version.V_7_0_0.major + 1) { | ||
| throw new IllegalArgumentException("parameter [local] is not supported"); |
Member
There was a problem hiding this comment.
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
}
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
Thanks, @dakrone! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.