|
@@ -43,6 +43,7 @@ import java.util.function.Consumer;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.function.Supplier;
|
|
|
|
|
|
+import static org.elasticsearch.xpack.ccr.action.AutoFollowCoordinator.AutoFollower.cleanFollowedRemoteIndices;
|
|
|
import static org.elasticsearch.xpack.ccr.action.AutoFollowCoordinator.AutoFollower.recordLeaderIndexAsFollowFunction;
|
|
|
import static org.hamcrest.Matchers.equalTo;
|
|
|
import static org.hamcrest.Matchers.is;
|
|
@@ -62,7 +63,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
ThreadPool threadPool = mockThreadPool();
|
|
|
when(client.getRemoteClusterClient(anyString())).thenReturn(client);
|
|
|
|
|
|
- ClusterState leaderState = createRemoteClusterState("logs-20190101");
|
|
|
+ ClusterState remoteState = createRemoteClusterState("logs-20190101");
|
|
|
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("logs-*"),
|
|
|
null, null, null, null, null, null, null, null, null, null, null);
|
|
@@ -89,12 +90,12 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(entries.get(0).getKey().getName(), equalTo("logs-20190101"));
|
|
|
assertThat(entries.get(0).getValue(), nullValue());
|
|
|
};
|
|
|
- AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, followerClusterStateSupplier(currentState)) {
|
|
|
+ AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, localClusterStateSupplier(currentState)) {
|
|
|
@Override
|
|
|
- void getLeaderClusterState(String remoteCluster,
|
|
|
+ void getRemoteClusterState(String remoteCluster,
|
|
|
BiConsumer<ClusterState, Exception> handler) {
|
|
|
assertThat(remoteCluster, equalTo("remote"));
|
|
|
- handler.accept(leaderState, null);
|
|
|
+ handler.accept(remoteState, null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -118,8 +119,13 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(result.getFollowedLeaderIndexUUIDs().get("remote").size(), equalTo(1));
|
|
|
handler.accept(null);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ void cleanFollowedRemoteIndices(ClusterState remoteClusterState, List<String> patterns) {
|
|
|
+ // Ignore, to avoid invoking updateAutoFollowMetadata(...) twice
|
|
|
+ }
|
|
|
};
|
|
|
- autoFollower.autoFollowIndices();
|
|
|
+ autoFollower.start();
|
|
|
assertThat(invoked[0], is(true));
|
|
|
}
|
|
|
|
|
@@ -136,7 +142,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
followedLeaderIndexUUIDS.put("remote", new ArrayList<>());
|
|
|
Map<String, Map<String, String>> headers = new HashMap<>();
|
|
|
AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(patterns, followedLeaderIndexUUIDS, headers);
|
|
|
- ClusterState followerState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState clusterState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(MetaData.builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
.build();
|
|
|
|
|
@@ -149,9 +155,9 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(results.get(0).clusterStateFetchException, sameInstance(failure));
|
|
|
assertThat(results.get(0).autoFollowExecutionResults.entrySet().size(), equalTo(0));
|
|
|
};
|
|
|
- AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, followerClusterStateSupplier(followerState)) {
|
|
|
+ AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, localClusterStateSupplier(clusterState)) {
|
|
|
@Override
|
|
|
- void getLeaderClusterState(String remoteCluster,
|
|
|
+ void getRemoteClusterState(String remoteCluster,
|
|
|
BiConsumer<ClusterState, Exception> handler) {
|
|
|
handler.accept(null, failure);
|
|
|
}
|
|
@@ -170,7 +176,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
fail("should not get here");
|
|
|
}
|
|
|
};
|
|
|
- autoFollower.autoFollowIndices();
|
|
|
+ autoFollower.start();
|
|
|
assertThat(invoked[0], is(true));
|
|
|
}
|
|
|
|
|
@@ -178,7 +184,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
Client client = mock(Client.class);
|
|
|
ThreadPool threadPool = mockThreadPool();
|
|
|
when(client.getRemoteClusterClient(anyString())).thenReturn(client);
|
|
|
- ClusterState leaderState = createRemoteClusterState("logs-20190101");
|
|
|
+ ClusterState remoteState = createRemoteClusterState("logs-20190101");
|
|
|
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("logs-*"),
|
|
|
null, null, null, null, null, null, null, null, null, null, null);
|
|
@@ -188,7 +194,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
followedLeaderIndexUUIDS.put("remote", new ArrayList<>());
|
|
|
Map<String, Map<String, String>> headers = new HashMap<>();
|
|
|
AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(patterns, followedLeaderIndexUUIDS, headers);
|
|
|
- ClusterState followerState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState clusterState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(MetaData.builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
.build();
|
|
|
|
|
@@ -204,11 +210,11 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(entries.get(0).getKey().getName(), equalTo("logs-20190101"));
|
|
|
assertThat(entries.get(0).getValue(), sameInstance(failure));
|
|
|
};
|
|
|
- AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, followerClusterStateSupplier(followerState)) {
|
|
|
+ AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, localClusterStateSupplier(clusterState)) {
|
|
|
@Override
|
|
|
- void getLeaderClusterState(String remoteCluster,
|
|
|
+ void getRemoteClusterState(String remoteCluster,
|
|
|
BiConsumer<ClusterState, Exception> handler) {
|
|
|
- handler.accept(leaderState, null);
|
|
|
+ handler.accept(remoteState, null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -227,7 +233,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
handler.accept(failure);
|
|
|
}
|
|
|
};
|
|
|
- autoFollower.autoFollowIndices();
|
|
|
+ autoFollower.start();
|
|
|
assertThat(invoked[0], is(true));
|
|
|
}
|
|
|
|
|
@@ -235,7 +241,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
Client client = mock(Client.class);
|
|
|
ThreadPool threadPool = mockThreadPool();
|
|
|
when(client.getRemoteClusterClient(anyString())).thenReturn(client);
|
|
|
- ClusterState leaderState = createRemoteClusterState("logs-20190101");
|
|
|
+ ClusterState remoteState = createRemoteClusterState("logs-20190101");
|
|
|
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("logs-*"),
|
|
|
null, null, null, null, null, null, null, null, null, null, null);
|
|
@@ -245,7 +251,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
followedLeaderIndexUUIDS.put("remote", new ArrayList<>());
|
|
|
Map<String, Map<String, String>> headers = new HashMap<>();
|
|
|
AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(patterns, followedLeaderIndexUUIDS, headers);
|
|
|
- ClusterState followerState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState clusterState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(MetaData.builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
.build();
|
|
|
|
|
@@ -261,11 +267,11 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(entries.get(0).getKey().getName(), equalTo("logs-20190101"));
|
|
|
assertThat(entries.get(0).getValue(), sameInstance(failure));
|
|
|
};
|
|
|
- AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, followerClusterStateSupplier(followerState)) {
|
|
|
+ AutoFollower autoFollower = new AutoFollower("remote", threadPool, handler, localClusterStateSupplier(clusterState)) {
|
|
|
@Override
|
|
|
- void getLeaderClusterState(String remoteCluster,
|
|
|
+ void getRemoteClusterState(String remoteCluster,
|
|
|
BiConsumer<ClusterState, Exception> handler) {
|
|
|
- handler.accept(leaderState, null);
|
|
|
+ handler.accept(remoteState, null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -284,8 +290,13 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
Consumer<Exception> handler) {
|
|
|
fail("should not get here");
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ void cleanFollowedRemoteIndices(ClusterState remoteClusterState, List<String> patterns) {
|
|
|
+ // Ignore, to avoid invoking updateAutoFollowMetadata(...)
|
|
|
+ }
|
|
|
};
|
|
|
- autoFollower.autoFollowIndices();
|
|
|
+ autoFollower.start();
|
|
|
assertThat(invoked[0], is(true));
|
|
|
}
|
|
|
|
|
@@ -293,7 +304,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("metrics-*"),
|
|
|
null, null, null, null, null, null, null, null, null, null, null);
|
|
|
Map<String, Map<String, String>> headers = new HashMap<>();
|
|
|
- ClusterState followerState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState clusterState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(MetaData.builder().putCustom(AutoFollowMetadata.TYPE,
|
|
|
new AutoFollowMetadata(Collections.singletonMap("remote", autoFollowPattern), Collections.emptyMap(), headers)))
|
|
|
.build();
|
|
@@ -328,12 +339,12 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
IndexRoutingTable indexRoutingTable = IndexRoutingTable.builder(imdBuilder.get("logs-0").getIndex()).addShard(shardRouting).build();
|
|
|
routingTableBuilder.add(indexRoutingTable);
|
|
|
|
|
|
- ClusterState leaderState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState remoteState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(imdBuilder)
|
|
|
.routingTable(routingTableBuilder.build())
|
|
|
.build();
|
|
|
|
|
|
- List<Index> result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, leaderState, followerState,
|
|
|
+ List<Index> result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, remoteState, clusterState,
|
|
|
Collections.emptyList());
|
|
|
result.sort(Comparator.comparing(Index::getName));
|
|
|
assertThat(result.size(), equalTo(3));
|
|
@@ -341,8 +352,8 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(result.get(1).getName(), equalTo("metrics-2"));
|
|
|
assertThat(result.get(2).getName(), equalTo("metrics-4"));
|
|
|
|
|
|
- List<String> followedIndexUUIDs = Collections.singletonList(leaderState.metaData().index("metrics-2").getIndexUUID());
|
|
|
- result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, leaderState, followerState, followedIndexUUIDs);
|
|
|
+ List<String> followedIndexUUIDs = Collections.singletonList(remoteState.metaData().index("metrics-2").getIndexUUID());
|
|
|
+ result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, remoteState, clusterState, followedIndexUUIDs);
|
|
|
result.sort(Comparator.comparing(Index::getName));
|
|
|
assertThat(result.size(), equalTo(2));
|
|
|
assertThat(result.get(0).getName(), equalTo("metrics-0"));
|
|
@@ -353,14 +364,14 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("*"),
|
|
|
null, null, null, null, null, null, null, null, null, null, null);
|
|
|
Map<String, Map<String, String>> headers = new HashMap<>();
|
|
|
- ClusterState followerState = ClusterState.builder(new ClusterName("remote"))
|
|
|
+ ClusterState clusterState = ClusterState.builder(new ClusterName("remote"))
|
|
|
.metaData(MetaData.builder().putCustom(AutoFollowMetadata.TYPE,
|
|
|
new AutoFollowMetadata(Collections.singletonMap("remote", autoFollowPattern), Collections.emptyMap(), headers)))
|
|
|
.build();
|
|
|
|
|
|
// 1 shard started and another not started:
|
|
|
- ClusterState leaderState = createRemoteClusterState("index1");
|
|
|
- MetaData.Builder mBuilder= MetaData.builder(leaderState.metaData());
|
|
|
+ ClusterState remoteState = createRemoteClusterState("index1");
|
|
|
+ MetaData.Builder mBuilder= MetaData.builder(remoteState.metaData());
|
|
|
mBuilder.put(IndexMetaData.builder("index2")
|
|
|
.settings(settings(Version.CURRENT).put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true))
|
|
|
.numberOfShards(1)
|
|
@@ -369,26 +380,26 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
TestShardRouting.newShardRouting("index2", 0, "1", true, ShardRoutingState.INITIALIZING);
|
|
|
IndexRoutingTable indexRoutingTable = IndexRoutingTable.builder(mBuilder.get("index2").getIndex()
|
|
|
).addShard(shardRouting).build();
|
|
|
- leaderState = ClusterState.builder(leaderState.getClusterName())
|
|
|
+ remoteState = ClusterState.builder(remoteState.getClusterName())
|
|
|
.metaData(mBuilder)
|
|
|
- .routingTable(RoutingTable.builder(leaderState.routingTable()).add(indexRoutingTable).build())
|
|
|
+ .routingTable(RoutingTable.builder(remoteState.routingTable()).add(indexRoutingTable).build())
|
|
|
.build();
|
|
|
|
|
|
- List<Index> result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, leaderState, followerState,
|
|
|
+ List<Index> result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, remoteState, clusterState,
|
|
|
Collections.emptyList());
|
|
|
assertThat(result.size(), equalTo(1));
|
|
|
assertThat(result.get(0).getName(), equalTo("index1"));
|
|
|
|
|
|
// Start second shard:
|
|
|
shardRouting = shardRouting.moveToStarted();
|
|
|
- indexRoutingTable = IndexRoutingTable.builder(leaderState.metaData().indices().get("index2").getIndex())
|
|
|
+ indexRoutingTable = IndexRoutingTable.builder(remoteState.metaData().indices().get("index2").getIndex())
|
|
|
.addShard(shardRouting).build();
|
|
|
- leaderState = ClusterState.builder(leaderState.getClusterName())
|
|
|
- .metaData(leaderState.metaData())
|
|
|
- .routingTable(RoutingTable.builder(leaderState.routingTable()).add(indexRoutingTable).build())
|
|
|
+ remoteState = ClusterState.builder(remoteState.getClusterName())
|
|
|
+ .metaData(remoteState.metaData())
|
|
|
+ .routingTable(RoutingTable.builder(remoteState.routingTable()).add(indexRoutingTable).build())
|
|
|
.build();
|
|
|
|
|
|
- result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, leaderState, followerState, Collections.emptyList());
|
|
|
+ result = AutoFollower.getLeaderIndicesToFollow(autoFollowPattern, remoteState, clusterState, Collections.emptyList());
|
|
|
assertThat(result.size(), equalTo(2));
|
|
|
result.sort(Comparator.comparing(Index::getName));
|
|
|
assertThat(result.get(0).getName(), equalTo("index1"));
|
|
@@ -422,6 +433,87 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
assertThat(result, sameInstance(clusterState));
|
|
|
}
|
|
|
|
|
|
+ public void testCleanFollowedLeaderIndices() {
|
|
|
+ AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(Collections.emptyMap(),
|
|
|
+ Collections.singletonMap("pattern1", Arrays.asList("index1", "index2", "index3")), Collections.emptyMap());
|
|
|
+ ClusterState clusterState = new ClusterState.Builder(new ClusterName("name"))
|
|
|
+ .metaData(new MetaData.Builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ MetaData remoteMetadata = new MetaData.Builder()
|
|
|
+ .put(IndexMetaData.builder("index1")
|
|
|
+ .settings(settings(Version.CURRENT)
|
|
|
+ .put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
|
|
|
+ .put(IndexMetaData.SETTING_INDEX_UUID, "index1"))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .put(IndexMetaData.builder("index3")
|
|
|
+ .settings(settings(Version.CURRENT)
|
|
|
+ .put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
|
|
|
+ .put(IndexMetaData.SETTING_INDEX_UUID, "index3"))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ Function<ClusterState, ClusterState> function = cleanFollowedRemoteIndices(remoteMetadata, Collections.singletonList("pattern1"));
|
|
|
+ AutoFollowMetadata result = function.apply(clusterState).metaData().custom(AutoFollowMetadata.TYPE);
|
|
|
+ assertThat(result.getFollowedLeaderIndexUUIDs().get("pattern1").size(), equalTo(2));
|
|
|
+ assertThat(result.getFollowedLeaderIndexUUIDs().get("pattern1").get(0), equalTo("index1"));
|
|
|
+ assertThat(result.getFollowedLeaderIndexUUIDs().get("pattern1").get(1), equalTo("index3"));
|
|
|
+ }
|
|
|
+
|
|
|
+ public void testCleanFollowedLeaderIndicesNoChanges() {
|
|
|
+ AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(Collections.emptyMap(),
|
|
|
+ Collections.singletonMap("pattern1", Arrays.asList("index1", "index2", "index3")), Collections.emptyMap());
|
|
|
+ ClusterState clusterState = new ClusterState.Builder(new ClusterName("name"))
|
|
|
+ .metaData(new MetaData.Builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ MetaData remoteMetadata = new MetaData.Builder()
|
|
|
+ .put(IndexMetaData.builder("index1")
|
|
|
+ .settings(settings(Version.CURRENT)
|
|
|
+ .put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
|
|
|
+ .put(IndexMetaData.SETTING_INDEX_UUID, "index1"))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .put(IndexMetaData.builder("index2")
|
|
|
+ .settings(settings(Version.CURRENT)
|
|
|
+ .put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
|
|
|
+ .put(IndexMetaData.SETTING_INDEX_UUID, "index2"))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .put(IndexMetaData.builder("index3")
|
|
|
+ .settings(settings(Version.CURRENT)
|
|
|
+ .put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true)
|
|
|
+ .put(IndexMetaData.SETTING_INDEX_UUID, "index3"))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ Function<ClusterState, ClusterState> function = cleanFollowedRemoteIndices(remoteMetadata, Collections.singletonList("pattern1"));
|
|
|
+ ClusterState result = function.apply(clusterState);
|
|
|
+ assertThat(result, sameInstance(clusterState));
|
|
|
+ }
|
|
|
+
|
|
|
+ public void testCleanFollowedLeaderIndicesNoEntry() {
|
|
|
+ AutoFollowMetadata autoFollowMetadata = new AutoFollowMetadata(Collections.emptyMap(),
|
|
|
+ Collections.singletonMap("pattern2", Arrays.asList("index1", "index2", "index3")), Collections.emptyMap());
|
|
|
+ ClusterState clusterState = new ClusterState.Builder(new ClusterName("name"))
|
|
|
+ .metaData(new MetaData.Builder().putCustom(AutoFollowMetadata.TYPE, autoFollowMetadata))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ MetaData remoteMetadata = new MetaData.Builder()
|
|
|
+ .put(IndexMetaData.builder("index1")
|
|
|
+ .settings(settings(Version.CURRENT).put(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true))
|
|
|
+ .numberOfShards(1)
|
|
|
+ .numberOfReplicas(0))
|
|
|
+ .build();
|
|
|
+
|
|
|
+ Function<ClusterState, ClusterState> function = cleanFollowedRemoteIndices(remoteMetadata, Collections.singletonList("pattern1"));
|
|
|
+ ClusterState result = function.apply(clusterState);
|
|
|
+ assertThat(result, sameInstance(clusterState));
|
|
|
+ }
|
|
|
+
|
|
|
public void testGetFollowerIndexName() {
|
|
|
AutoFollowPattern autoFollowPattern = new AutoFollowPattern("remote", Collections.singletonList("metrics-*"), null, null,
|
|
|
null, null, null, null, null, null, null, null, null);
|
|
@@ -511,7 +603,7 @@ public class AutoFollowCoordinatorTests extends ESTestCase {
|
|
|
return csBuilder.build();
|
|
|
}
|
|
|
|
|
|
- private static Supplier<ClusterState> followerClusterStateSupplier(ClusterState... states) {
|
|
|
+ private static Supplier<ClusterState> localClusterStateSupplier(ClusterState... states) {
|
|
|
final AutoFollowMetadata emptyAutoFollowMetadata =
|
|
|
new AutoFollowMetadata(Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap());
|
|
|
final ClusterState lastState = ClusterState.builder(new ClusterName("remote"))
|