From 86d1d03c37768ca24cc4b5a2a702db6a828a3222 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 15 Mar 2019 17:16:25 -0400 Subject: [PATCH] Remove cluster state size (#40109) This commit removes the cluster state size field from the cluster state response, and drops the backwards compatibility layer added in 6.7.0 to continue to support this field. As calculation of this field was expensive and had dubious value, we have elected to remove this field. --- build.gradle | 5 +- ...rossClusterSearchUnavailableClusterIT.java | 2 +- qa/cluster-state-size/build.gradle | 33 ---------- .../ClusterStateSizeRestIT.java | 62 ------------------- .../resources/rest-api-spec/test/10_basic.yml | 15 ----- .../test/cluster.state/10_basic.yml | 13 ---- .../cluster/state/ClusterStateResponse.java | 35 ++--------- .../state/TransportClusterStateAction.java | 29 ++------- .../admin/cluster/RestClusterStateAction.java | 10 +-- .../state/ClusterStateResponseTests.java | 2 +- .../transport/FailAndRetryMockTransport.java | 2 +- .../TransportClientHeadersTests.java | 2 +- .../TransportClientNodesServiceTests.java | 2 +- .../cluster/GetClusterStateTests.java | 54 ---------------- .../rest/action/cat/RestNodesActionTests.java | 2 +- .../RemoteClusterConnectionTests.java | 2 +- .../action/AutoFollowCoordinatorTests.java | 14 ++--- 17 files changed, 28 insertions(+), 256 deletions(-) delete mode 100644 qa/cluster-state-size/build.gradle delete mode 100644 qa/cluster-state-size/src/test/java/org/elasticsearch/cluster_state_size/ClusterStateSizeRestIT.java delete mode 100644 qa/cluster-state-size/src/test/resources/rest-api-spec/test/10_basic.yml delete mode 100644 server/src/test/java/org/elasticsearch/cluster/GetClusterStateTests.java diff --git a/build.gradle b/build.gradle index 47139cc6bed..e1c4bb05b0a 100644 --- a/build.gradle +++ b/build.gradle @@ -161,8 +161,9 @@ task verifyVersions { * the enabled state of every bwc task. It should be set back to true * after the backport of the backcompat code is complete. */ -boolean bwc_tests_enabled = true -final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */ + +boolean bwc_tests_enabled = false +final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/40061" /* place a PR link here when committing bwc changes */ if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/qa/ccs-unavailable-clusters/src/test/java/org/elasticsearch/search/CrossClusterSearchUnavailableClusterIT.java b/qa/ccs-unavailable-clusters/src/test/java/org/elasticsearch/search/CrossClusterSearchUnavailableClusterIT.java index e280b1d2d1a..2bf0eae1381 100644 --- a/qa/ccs-unavailable-clusters/src/test/java/org/elasticsearch/search/CrossClusterSearchUnavailableClusterIT.java +++ b/qa/ccs-unavailable-clusters/src/test/java/org/elasticsearch/search/CrossClusterSearchUnavailableClusterIT.java @@ -127,7 +127,7 @@ public class CrossClusterSearchUnavailableClusterIT extends ESRestTestCase { builder.add(node); } ClusterState build = ClusterState.builder(clusterName).nodes(builder.build()).build(); - channel.sendResponse(new ClusterStateResponse(clusterName, build, 0L, false)); + channel.sendResponse(new ClusterStateResponse(clusterName, build, false)); }); newService.start(); newService.acceptIncomingRequests(); diff --git a/qa/cluster-state-size/build.gradle b/qa/cluster-state-size/build.gradle deleted file mode 100644 index b2b16855d44..00000000000 --- a/qa/cluster-state-size/build.gradle +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 diff --git a/qa/cluster-state-size/src/test/java/org/elasticsearch/cluster_state_size/ClusterStateSizeRestIT.java b/qa/cluster-state-size/src/test/java/org/elasticsearch/cluster_state_size/ClusterStateSizeRestIT.java deleted file mode 100644 index 045c3cdaddd..00000000000 --- a/qa/cluster-state-size/src/test/java/org/elasticsearch/cluster_state_size/ClusterStateSizeRestIT.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 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; - } - -} diff --git a/qa/cluster-state-size/src/test/resources/rest-api-spec/test/10_basic.yml b/qa/cluster-state-size/src/test/resources/rest-api-spec/test/10_basic.yml deleted file mode 100644 index 529847b32bd..00000000000 --- a/qa/cluster-state-size/src/test/resources/rest-api-spec/test/10_basic.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -"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 diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.state/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.state/10_basic.yml index ffc5d11ad16..b443e322f80 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.state/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cluster.state/10_basic.yml @@ -5,19 +5,6 @@ - is_true: master_node ---- -"get cluster state does not return cluster state size by default": - - skip: - version: " - 6.6.99" - reason: "backwards compatibility break in 6.7.0 removes compressed_size* from the response" - - do: - cluster.state: - human: true - - - is_true: master_node - - is_false: compressed_size_in_bytes - - is_false: compressed_size - --- "get cluster state returns cluster_uuid at the top level": - skip: diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateResponse.java index 24f9c49f40b..c63f12cfbcb 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateResponse.java @@ -39,18 +39,14 @@ public class ClusterStateResponse extends ActionResponse { private ClusterName clusterName; private ClusterState clusterState; - // the total compressed size of the full cluster state, not just - // the parts included in this response - private ByteSizeValue totalCompressedSize; private boolean waitForTimedOut = false; public ClusterStateResponse() { } - public ClusterStateResponse(ClusterName clusterName, ClusterState clusterState, long sizeInBytes, boolean waitForTimedOut) { + public ClusterStateResponse(ClusterName clusterName, ClusterState clusterState, boolean waitForTimedOut) { this.clusterName = clusterName; this.clusterState = clusterState; - this.totalCompressedSize = new ByteSizeValue(sizeInBytes); this.waitForTimedOut = waitForTimedOut; } @@ -69,17 +65,6 @@ public class ClusterStateResponse extends ActionResponse { return this.clusterName; } - /** - * The total compressed size of the full cluster state, not just the parts - * returned by {@link #getState()}. The total compressed size is the size - * of the cluster state as it would be transmitted over the network during - * intra-node communication. - */ - @Deprecated - public ByteSizeValue getTotalCompressedSize() { - return totalCompressedSize; - } - /** * Returns whether the request timed out waiting for a cluster state with a metadata version equal or * higher than the specified metadata. @@ -97,14 +82,8 @@ public class ClusterStateResponse extends ActionResponse { } else { clusterState = ClusterState.readFrom(in, null); } - if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) { - totalCompressedSize = new ByteSizeValue(in); - } else { - // in a mixed cluster, if a pre 6.0 node processes the get cluster state - // request, then a compressed size won't be returned, so just return 0; - // its a temporary situation until all nodes in the cluster have been upgraded, - // at which point the correct cluster state size will always be reported - totalCompressedSize = new ByteSizeValue(0L); + if (in.getVersion().before(Version.V_7_0_0)) { + new ByteSizeValue(in); } if (in.getVersion().onOrAfter(Version.V_6_6_0)) { waitForTimedOut = in.readBoolean(); @@ -124,8 +103,8 @@ public class ClusterStateResponse extends ActionResponse { ClusterModule.filterCustomsForPre63Clients(clusterState).writeTo(out); } } - if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) { - totalCompressedSize.writeTo(out); + if (out.getVersion().before(Version.V_7_0_0)) { + ByteSizeValue.ZERO.writeTo(out); } if (out.getVersion().onOrAfter(Version.V_6_6_0)) { out.writeBoolean(waitForTimedOut); @@ -142,8 +121,7 @@ public class ClusterStateResponse extends ActionResponse { // Best effort. Only compare cluster state version and master node id, // because cluster state doesn't implement equals() Objects.equals(getVersion(clusterState), getVersion(response.clusterState)) && - Objects.equals(getMasterNodeId(clusterState), getMasterNodeId(response.clusterState)) && - Objects.equals(totalCompressedSize, response.totalCompressedSize); + Objects.equals(getMasterNodeId(clusterState), getMasterNodeId(response.clusterState)); } @Override @@ -154,7 +132,6 @@ public class ClusterStateResponse extends ActionResponse { clusterName, getVersion(clusterState), getMasterNodeId(clusterState), - totalCompressedSize, waitForTimedOut ); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java index 55acc6d095c..d0fd08b690f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java @@ -22,14 +22,12 @@ package org.elasticsearch.action.admin.cluster.state; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ClusterStateObserver; import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.coordination.PublicationTransportHandler; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.metadata.MetaData; @@ -37,7 +35,6 @@ import org.elasticsearch.cluster.metadata.MetaData.Custom; import org.elasticsearch.cluster.routing.RoutingTable; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.node.NodeClosedException; import org.elasticsearch.threadpool.ThreadPool; @@ -49,21 +46,11 @@ import java.util.function.Predicate; public class TransportClusterStateAction extends TransportMasterNodeReadAction { private final Logger logger = LogManager.getLogger(getClass()); - private final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); - - public static final boolean CLUSTER_STATE_SIZE; static { final String property = System.getProperty("es.cluster_state.size"); - if (property == null) { - CLUSTER_STATE_SIZE = false; - } else { - final boolean clusterStateSize = Boolean.parseBoolean(property); - if (clusterStateSize) { - CLUSTER_STATE_SIZE = true; - } else { - throw new IllegalArgumentException("es.cluster_state.size can only be unset or [true] but was [" + property + "]"); - } + if (property != null) { + throw new IllegalArgumentException("es.cluster_state.size is no longer respected but was [" + property + "]"); } } @@ -127,7 +114,7 @@ public class TransportClusterStateAction extends TransportMasterNodeReadAction imp } else if (ClusterStateAction.NAME.equals(action)) { TransportResponseHandler transportResponseHandler = responseHandlers.onResponseReceived(requestId, listener); ClusterState clusterState = getMockClusterState(node); - transportResponseHandler.handleResponse(new ClusterStateResponse(clusterName, clusterState, 0L, false)); + transportResponseHandler.handleResponse(new ClusterStateResponse(clusterName, clusterState, false)); } else if (TransportService.HANDSHAKE_ACTION_NAME.equals(action)) { TransportResponseHandler transportResponseHandler = responseHandlers.onResponseReceived(requestId, listener); Version version = node.getVersion(); diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java b/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java index 3efd447c468..e63f3a1d59a 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java +++ b/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java @@ -175,7 +175,7 @@ public class TransportClientHeadersTests extends AbstractClientHeadersTestCase { address.address().getHostString(), address.getAddress(), address, Collections.emptyMap(), Collections.singleton(DiscoveryNode.Role.DATA), Version.CURRENT))); ((TransportResponseHandler) handler) - .handleResponse(new ClusterStateResponse(cluster1, builder.build(), 0L, false)); + .handleResponse(new ClusterStateResponse(cluster1, builder.build(), false)); clusterStateLatch.countDown(); } else if (TransportService.HANDSHAKE_ACTION_NAME .equals(action)) { ((TransportResponseHandler) handler).handleResponse( diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java b/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java index 3100dcbcc66..6796a23ef0f 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java +++ b/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java @@ -427,7 +427,7 @@ public class TransportClientNodesServiceTests extends ESTestCase { DiscoveryNodes discoveryNodes = DiscoveryNodes.builder().add(transportService.getLocalDiscoNode()).build(); ClusterState build = ClusterState.builder(ClusterName.DEFAULT).nodes(discoveryNodes).build(); - channel.sendResponse(new ClusterStateResponse(ClusterName.DEFAULT, build, 0L, false)); + channel.sendResponse(new ClusterStateResponse(ClusterName.DEFAULT, build, false)); } void failToRespond() { diff --git a/server/src/test/java/org/elasticsearch/cluster/GetClusterStateTests.java b/server/src/test/java/org/elasticsearch/cluster/GetClusterStateTests.java deleted file mode 100644 index 38bed31de4a..00000000000 --- a/server/src/test/java/org/elasticsearch/cluster/GetClusterStateTests.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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; - -import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.test.ESSingleNodeTestCase; - -import static org.hamcrest.Matchers.equalTo; - -/** - * Tests for the get cluster state API. - * - * See: {@link org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction} - * {@link org.elasticsearch.rest.action.admin.cluster.RestClusterStateAction} - */ -public class GetClusterStateTests extends ESSingleNodeTestCase { - - public void testGetClusterState() { - ClusterStateResponse response = client().admin().cluster().prepareState().get(); - assertNotNull(response.getState()); - assertNotNull(response.getClusterName()); - // the cluster state size is no longer computed by default - assertThat(response.getTotalCompressedSize().getBytes(), equalTo(0L)); - } - - public void testSizeDerivedFromFullClusterState() { - ClusterStateResponse response = client().admin().cluster().prepareState().get(); - final ClusterState clusterState = response.getState(); - final long totalCompressedSize = response.getTotalCompressedSize().getBytes(); - // exclude the nodes from being returned, the total size returned should still be - // the same as when no filtering was applied to the cluster state retrieved - response = client().admin().cluster().prepareState().setNodes(false).get(); - assertEquals(totalCompressedSize, response.getTotalCompressedSize().getBytes()); - assertNotEquals(clusterState, response.getState()); - assertEquals(0, response.getState().nodes().getSize()); - } -} diff --git a/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java b/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java index 7a35177c8ad..b9346e1c71a 100644 --- a/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java +++ b/server/src/test/java/org/elasticsearch/rest/action/cat/RestNodesActionTests.java @@ -60,7 +60,7 @@ public class RestNodesActionTests extends ESTestCase { ClusterState clusterState = mock(ClusterState.class); when(clusterState.nodes()).thenReturn(discoveryNodes); - ClusterStateResponse clusterStateResponse = new ClusterStateResponse(clusterName, clusterState, randomNonNegativeLong(), false); + ClusterStateResponse clusterStateResponse = new ClusterStateResponse(clusterName, clusterState, false); NodesInfoResponse nodesInfoResponse = new NodesInfoResponse(clusterName, Collections.emptyList(), Collections.emptyList()); NodesStatsResponse nodesStatsResponse = new NodesStatsResponse(clusterName, Collections.emptyList(), Collections.emptyList()); diff --git a/server/src/test/java/org/elasticsearch/transport/RemoteClusterConnectionTests.java b/server/src/test/java/org/elasticsearch/transport/RemoteClusterConnectionTests.java index 3af98eaaf40..9c10480e2b0 100644 --- a/server/src/test/java/org/elasticsearch/transport/RemoteClusterConnectionTests.java +++ b/server/src/test/java/org/elasticsearch/transport/RemoteClusterConnectionTests.java @@ -165,7 +165,7 @@ public class RemoteClusterConnectionTests extends ESTestCase { builder.add(node); } ClusterState build = ClusterState.builder(clusterName).nodes(builder.build()).build(); - channel.sendResponse(new ClusterStateResponse(clusterName, build, 0L, false)); + channel.sendResponse(new ClusterStateResponse(clusterName, build, false)); }); newService.start(); newService.acceptIncomingRequests(); diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java index 2037c7faaa7..75e6a732c82 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/AutoFollowCoordinatorTests.java @@ -98,7 +98,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { long metadataVersion, BiConsumer handler) { assertThat(remoteCluster, equalTo("remote")); - handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, false), null); } @Override @@ -217,7 +217,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { void getRemoteClusterState(String remoteCluster, long metadataVersion, BiConsumer handler) { - handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, false), null); } @Override @@ -274,7 +274,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { void getRemoteClusterState(String remoteCluster, long metadataVersion, BiConsumer handler) { - handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, false), null); } @Override @@ -729,7 +729,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { BiConsumer handler) { assertThat(remoteCluster, equalTo("remote")); assertThat(metadataVersion, greaterThan(previousRequestedMetadataVersion)); - handler.accept(new ClusterStateResponse(new ClusterName("name"), leaderStates.poll(), 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), leaderStates.poll(), false), null); } @Override @@ -788,7 +788,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { counter.incrementAndGet(); assertThat(remoteCluster, equalTo("remote")); assertThat(metadataVersion, greaterThan(previousRequestedMetadataVersion)); - handler.accept(new ClusterStateResponse(new ClusterName("name"), null, 1L, true), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), null, true), null); } @Override @@ -838,7 +838,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { long metadataVersion, BiConsumer handler) { assertThat(remoteCluster, equalTo("remote")); - handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, false), null); } @Override @@ -914,7 +914,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase { long metadataVersion, BiConsumer handler) { assertThat(remoteCluster, equalTo("remote")); - handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, 1L, false), null); + handler.accept(new ClusterStateResponse(new ClusterName("name"), remoteState, false), null); } @Override