-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Stop returning cluster state size by default #40016
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e961847
Stop returning cluster state size by default
jasontedor 95c67d8
Add missing newline
jasontedor a74c2cd
Deprecate the Java API
jasontedor 5c2f136
Iteration
jasontedor 7e7d034
Clarify comment
jasontedor 8796eb1
Iteration and checkstyle
jasontedor 45e7c14
Fix test
jasontedor 5ed0b30
Also do not wipe templates (why this did not produce locally?)
jasontedor 136bc79
Fix BWC test
jasontedor eedb3e7
Update qa/cluster-state-size/build.gradle
jasontedor d6a53f7
Update qa/cluster-state-size/build.gradle
jasontedor 1571517
Update qa/cluster-state-size/build.gradle
jasontedor d4afd84
Update rest-api-spec/src/main/resources/rest-api-spec/test/cluster.st…
jasontedor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import org.elasticsearch.gradle.test.RestIntegTestTask | ||
|
|
||
| apply plugin: 'elasticsearch.standalone-test' | ||
|
|
||
| task integTest(type: RestIntegTestTask) { | ||
| mustRunAfter(precommit) | ||
| } | ||
|
|
||
| integTestCluster { | ||
| systemProperty 'es.cluster_state.size', 'true' | ||
| } | ||
|
|
||
| unitTest.enabled = false | ||
| check.dependsOn integTest | ||
62 changes: 62 additions & 0 deletions
62
...state-size/src/test/java/org/elasticsearch/cluster_state_size/ClusterStateSizeRestIT.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package org.elasticsearch.cluster_state_size; | ||
|
|
||
| import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; | ||
| import org.elasticsearch.Version; | ||
| import org.elasticsearch.client.RequestOptions; | ||
| import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; | ||
| import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; | ||
|
|
||
| import java.util.Collections; | ||
|
|
||
| public class ClusterStateSizeRestIT extends ESClientYamlSuiteTestCase { | ||
|
|
||
| public ClusterStateSizeRestIT(final ClientYamlTestCandidate candidate) { | ||
| super(candidate); | ||
| } | ||
|
|
||
| @ParametersFactory | ||
| public static Iterable<Object[]> parameters() throws Exception { | ||
| return ESClientYamlSuiteTestCase.createParameters(); | ||
| } | ||
|
|
||
| @Override | ||
| protected RequestOptions getCatNodesVersionMasterRequestOptions() { | ||
| final RequestOptions.Builder builder = RequestOptions.DEFAULT.toBuilder(); | ||
| final VersionSensitiveWarningsHandler handler = new VersionSensitiveWarningsHandler(Collections.singleton(Version.CURRENT)); | ||
| handler.current("es.cluster_state.size is deprecated and will be removed in 7.0.0"); | ||
| builder.setWarningsHandler(handler); | ||
| return builder.build(); | ||
| } | ||
|
|
||
| @Override | ||
| protected boolean preserveClusterSettings() { | ||
| // we did not add any cluster settings, we are the only test using this cluster, and trying to clean these will trigger a warning | ||
| return true; | ||
| } | ||
|
|
||
| @Override | ||
| protected boolean preserveTemplatesUponCompletion() { | ||
| // we did not add any templates, we are the only test using this cluster, and trying to clean these will trigger a warning | ||
| return true; | ||
| } | ||
|
|
||
| } |
15 changes: 15 additions & 0 deletions
15
qa/cluster-state-size/src/test/resources/rest-api-spec/test/10_basic.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| "get cluster state returns cluster state size with human readable format": | ||
| - skip: | ||
| reason: deprecation was added in 6.7.0 | ||
| features: "warnings" | ||
|
|
||
| - do: | ||
| warnings: | ||
| - 'es.cluster_state.size is deprecated and will be removed in 7.0.0' | ||
| cluster.state: | ||
| human: true | ||
|
|
||
| - is_true: master_node | ||
| - gte: { compressed_size_in_bytes: 50 } | ||
| - is_true: compressed_size |
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.