Skip to content

Commit fa346c6

Browse files
committed
(7.x) BWC layer for replicated closed indices
1 parent 719d905 commit fa346c6

File tree

21 files changed

+93
-50
lines changed

21 files changed

+93
-50
lines changed

qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ public void testClosedIndices() throws Exception {
10571057
closeIndex(index);
10581058
}
10591059

1060-
if (getOldClusterVersion().onOrAfter(Version.V_8_0_0)) {
1060+
if (getOldClusterVersion().onOrAfter(Version.V_7_1_0)) {
10611061
ensureGreenLongWait(index);
10621062
assertClosedIndex(index, true);
10631063
} else {

qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
3131
import org.elasticsearch.common.xcontent.support.XContentMapValues;
3232
import org.elasticsearch.index.IndexSettings;
33+
import org.elasticsearch.rest.RestStatus;
3334
import org.elasticsearch.rest.action.document.RestIndexAction;
3435
import org.elasticsearch.test.rest.yaml.ObjectPath;
3536

@@ -341,7 +342,7 @@ public void testRecoveryClosedIndex() throws Exception {
341342
}
342343

343344
final Version indexVersionCreated = indexVersionCreated(indexName);
344-
if (indexVersionCreated.onOrAfter(Version.V_8_0_0)) {
345+
if (indexVersionCreated.onOrAfter(Version.V_7_1_0)) {
345346
// index was created on a version that supports the replication of closed indices,
346347
// so we expect the index to be closed and replicated
347348
ensureGreen(indexName);
@@ -361,7 +362,11 @@ public void testCloseIndexDuringRollingUpgrade() throws Exception {
361362
final String indexName =
362363
String.join("_", "index", CLUSTER_TYPE.toString(), Integer.toString(minimumNodeVersion.id)).toLowerCase(Locale.ROOT);
363364

364-
if (indexExists(indexName) == false) {
365+
final Request indexExistsRequest = new Request("HEAD", "/" + indexName);
366+
indexExistsRequest.setOptions(allowTypesRemovalWarnings());
367+
368+
final Response indexExistsResponse = client().performRequest(indexExistsRequest);
369+
if (RestStatus.OK.getStatus() != indexExistsResponse.getStatusLine().getStatusCode()) {
365370
createIndex(indexName, Settings.builder()
366371
.put(IndexMetaData.INDEX_NUMBER_OF_SHARDS_SETTING.getKey(), 1)
367372
.put(IndexMetaData.INDEX_NUMBER_OF_REPLICAS_SETTING.getKey(), 0)
@@ -370,7 +375,7 @@ public void testCloseIndexDuringRollingUpgrade() throws Exception {
370375
closeIndex(indexName);
371376
}
372377

373-
if (minimumNodeVersion.onOrAfter(Version.V_8_0_0)) {
378+
if (minimumNodeVersion.onOrAfter(Version.V_7_1_0)) {
374379
// index is created on a version that supports the replication of closed indices,
375380
// so we expect the index to be closed and replicated
376381
ensureGreen(indexName);

rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
)
5151
$/
5252
---
53-
"Test cat indices output for closed index (pre 8.0.0)":
53+
"Test cat indices output for closed index (pre 7.1.0)":
5454
- skip:
55-
version: "8.0.0 - "
56-
reason: "closed indices are replicated starting version 8.0"
55+
version: "7.1.0 - "
56+
reason: "closed indices are replicated starting version 7.1.0"
5757

5858
- do:
5959
indices.create:
@@ -93,8 +93,8 @@
9393
---
9494
"Test cat indices output for closed index":
9595
- skip:
96-
version: " - 7.99.99"
97-
reason: "closed indices are replicated starting version 8.0"
96+
version: " - 7.0.99"
97+
reason: "closed indices are replicated starting version 7.1.0"
9898

9999
- do:
100100
indices.create:

rest-api-spec/src/main/resources/rest-api-spec/test/cat.recovery/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
---
8080
"Test cat recovery output for closed index":
8181
- skip:
82-
version: " - 7.99.99"
83-
reason: closed indices are replicated starting version 8.0.0
82+
version: " - 7.0.99"
83+
reason: closed indices are replicated starting version 7.1.0
8484

8585
- do:
8686
indices.create:

rest-api-spec/src/main/resources/rest-api-spec/test/cluster.allocation_explain/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
---
5959
"Cluster shard allocation explanation test with a closed index":
6060
- skip:
61-
version: " - 7.99.99"
62-
reason: closed indices are replicated starting version 8.0.0
61+
version: " - 7.0.99"
62+
reason: closed indices are replicated starting version 7.1.0
6363

6464
- do:
6565
indices.create:

rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/10_basic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@
133133
- is_true: indices.test_index.shards
134134

135135
---
136-
"cluster health with closed index (pre 8.0)":
136+
"cluster health with closed index (pre 7.1.0)":
137137
- skip:
138-
version: "8.0.0 - "
139-
reason: "closed indices are replicated starting version 8.0"
138+
version: "7.1.0 - "
139+
reason: "closed indices are replicated starting version 7.1.0"
140140

141141
- do:
142142
indices.create:
@@ -209,8 +209,8 @@
209209
---
210210
"cluster health with closed index":
211211
- skip:
212-
version: " - 7.99.99"
213-
reason: "closed indices are replicated starting version 8.0"
212+
version: " - 7.0.99"
213+
reason: "closed indices are replicated starting version 7.1.0"
214214

215215
- do:
216216
indices.create:

rest-api-spec/src/main/resources/rest-api-spec/test/cluster.health/30_indices_options.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ setup:
3131
---
3232
"cluster health with expand_wildcards":
3333
- skip:
34-
version: " - 7.99.99"
35-
reason: "indices options has been introduced in cluster health request starting version 8.0"
34+
version: " - 7.0.99"
35+
reason: "indices options has been introduced in cluster health request starting version 7.1.0"
3636

3737
- do:
3838
cluster.health:

rest-api-spec/src/main/resources/rest-api-spec/test/indices.open/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
---
6666
"Close index with wait_for_active_shards set to all":
6767
- skip:
68-
version: " - 7.99.99"
69-
reason: "closed indices are replicated starting version 8.0"
68+
version: " - 7.0.99"
69+
reason: "closed indices are replicated starting version 7.1.0"
7070

7171
- do:
7272
indices.create:

rest-api-spec/src/main/resources/rest-api-spec/test/indices.recovery/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
---
4343
"Indices recovery test for closed index":
4444
- skip:
45-
version: " - 7.99.99"
46-
reason: closed indices are replicated starting version 8.0.0
45+
version: " - 7.0.99"
46+
reason: closed indices are replicated starting version 7.1.0
4747

4848
- do:
4949
indices.create:

server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public ClusterHealthRequest(StreamInput in) throws IOException {
8484
if (in.getVersion().onOrAfter(Version.V_6_2_0)) {
8585
waitForNoInitializingShards = in.readBoolean();
8686
}
87-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
87+
if (in.getVersion().onOrAfter(Version.V_7_1_0)) {
8888
indicesOptions = IndicesOptions.readIndicesOptions(in);
8989
} else {
9090
indicesOptions = IndicesOptions.lenientExpandOpen();
@@ -121,7 +121,7 @@ public void writeTo(StreamOutput out) throws IOException {
121121
if (out.getVersion().onOrAfter(Version.V_6_2_0)) {
122122
out.writeBoolean(waitForNoInitializingShards);
123123
}
124-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
124+
if (out.getVersion().onOrAfter(Version.V_7_1_0)) {
125125
indicesOptions.writeIndicesOptions(out);
126126
}
127127
}

server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class CloseIndexRequest extends AcknowledgedRequest<CloseIndexRequest> im
4040

4141
private String[] indices;
4242
private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen();
43-
private ActiveShardCount waitForActiveShards = ActiveShardCount.DEFAULT; //NORELEASE Changes this to NONE to keep previous behavior
43+
private ActiveShardCount waitForActiveShards = ActiveShardCount.NONE;
4444

4545
public CloseIndexRequest() {
4646
}
@@ -118,7 +118,7 @@ public void readFrom(StreamInput in) throws IOException {
118118
super.readFrom(in);
119119
indices = in.readStringArray();
120120
indicesOptions = IndicesOptions.readIndicesOptions(in);
121-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
121+
if (in.getVersion().onOrAfter(Version.V_7_1_0)) {
122122
waitForActiveShards = ActiveShardCount.readFrom(in);
123123
} else {
124124
waitForActiveShards = ActiveShardCount.NONE;
@@ -130,7 +130,7 @@ public void writeTo(StreamOutput out) throws IOException {
130130
super.writeTo(out);
131131
out.writeStringArray(indices);
132132
indicesOptions.writeIndicesOptions(out);
133-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
133+
if (out.getVersion().onOrAfter(Version.V_7_1_0)) {
134134
waitForActiveShards.writeTo(out);
135135
}
136136
}

server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ public CloseIndexResponse(final boolean acknowledged, final boolean shardsAcknow
3737
@Override
3838
public void readFrom(StreamInput in) throws IOException {
3939
super.readFrom(in);
40-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
40+
if (in.getVersion().onOrAfter(Version.V_7_1_0)) {
4141
readShardsAcknowledged(in);
4242
}
4343
}
4444

4545
@Override
4646
public void writeTo(StreamOutput out) throws IOException {
4747
super.writeTo(out);
48-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
48+
if (out.getVersion().onOrAfter(Version.V_7_1_0)) {
4949
writeShardsAcknowledged(out);
5050
}
5151
}

server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ static ClusterState addIndexClosedBlocks(final Index[] indices, final Map<Index,
250250
// Check if index closing conflicts with any running snapshots
251251
SnapshotsService.checkIndexClosing(currentState, indicesToClose);
252252

253+
// If the cluster is in a mixed version that does not support the shard close action,
254+
// we use the previous way to close indices and directly close them without sanity checks
255+
final boolean useDirectClose = currentState.nodes().getMinNodeVersion().before(Version.V_6_7_0);
256+
253257
final ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());
254258
final RoutingTable.Builder routingTable = RoutingTable.builder(currentState.routingTable());
255259

@@ -267,11 +271,19 @@ static ClusterState addIndexClosedBlocks(final Index[] indices, final Map<Index,
267271
}
268272
}
269273
}
270-
if (indexBlock == null) {
271-
// Create a new index closed block
272-
indexBlock = createIndexClosingBlock();
274+
if (useDirectClose) {
275+
logger.debug("closing index {} directly", index);
276+
metadata.put(IndexMetaData.builder(indexToClose).state(IndexMetaData.State.CLOSE));
277+
blocks.removeIndexBlockWithId(index.getName(), INDEX_CLOSED_BLOCK_ID);
278+
routingTable.remove(index.getName());
279+
indexBlock = INDEX_CLOSED_BLOCK;
280+
} else {
281+
if (indexBlock == null) {
282+
// Create a new index closed block
283+
indexBlock = createIndexClosingBlock();
284+
}
285+
assert Strings.hasLength(indexBlock.uuid()) : "Closing block should have a UUID";
273286
}
274-
assert Strings.hasLength(indexBlock.uuid()) : "Closing block should have a UUID";
275287
blocks.addIndexBlock(index.getName(), indexBlock);
276288
blockedIndices.put(index, indexBlock);
277289
}
@@ -402,7 +414,7 @@ static ClusterState closeRoutingTable(final ClusterState currentState,
402414

403415
// Remove the index routing table of closed indices if the cluster is in a mixed version
404416
// that does not support the replication of closed indices
405-
final boolean removeRoutingTable = currentState.nodes().getMinNodeVersion().before(Version.V_8_0_0);
417+
final boolean removeRoutingTable = currentState.nodes().getMinNodeVersion().before(Version.V_7_1_0);
406418

407419
final MetaData.Builder metadata = MetaData.builder(currentState.metaData());
408420
final ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());

server/src/test/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public void testSerialize() throws Exception {
5757

5858
public void testBwcSerialization() throws Exception {
5959
for (int runs = 0; runs < randomIntBetween(5, 20); runs++) {
60-
// Generate a random cluster health request in version < 8.0.0 and serializes it
60+
// Generate a random cluster health request in version < 7.1.0 and serializes it
6161
final BytesStreamOutput out = new BytesStreamOutput();
62-
out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_8_0_0)));
62+
out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_1_0)));
6363

6464
final ClusterHealthRequest expected = randomRequest();
6565
{
@@ -112,9 +112,9 @@ public void testBwcSerialization() throws Exception {
112112
// Generate a random cluster health request in current version
113113
final ClusterHealthRequest expected = randomRequest();
114114

115-
// Serialize to node in version < 8.0.0
115+
// Serialize to node in version < 7.1.0
116116
final BytesStreamOutput out = new BytesStreamOutput();
117-
out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_8_0_0)));
117+
out.setVersion(randomVersionBetween(random(), Version.V_6_3_0, getPreviousVersion(Version.V_7_1_0)));
118118
expected.writeTo(out);
119119

120120
// Deserialize and check the cluster health request

server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void testBwcSerialization() throws Exception {
5454
{
5555
final CloseIndexRequest request = randomRequest();
5656
try (BytesStreamOutput out = new BytesStreamOutput()) {
57-
out.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_8_0_0)));
57+
out.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_1_0)));
5858
request.writeTo(out);
5959

6060
try (StreamInput in = out.bytes().streamInput()) {
@@ -77,7 +77,7 @@ public void testBwcSerialization() throws Exception {
7777

7878
final CloseIndexRequest deserializedRequest = new CloseIndexRequest();
7979
try (StreamInput in = out.bytes().streamInput()) {
80-
in.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_8_0_0)));
80+
in.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_1_0)));
8181
deserializedRequest.readFrom(in);
8282
}
8383
assertEquals(sample.getParentTask(), deserializedRequest.getParentTask());

server/src/test/java/org/elasticsearch/action/admin/indices/close/CloseIndexResponseTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testBwcSerialization() throws Exception {
4848
{
4949
final CloseIndexResponse response = randomResponse();
5050
try (BytesStreamOutput out = new BytesStreamOutput()) {
51-
out.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_8_0_0)));
51+
out.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_1_0)));
5252
response.writeTo(out);
5353

5454
final AcknowledgedResponse deserializedResponse = new AcknowledgedResponse();
@@ -65,7 +65,7 @@ public void testBwcSerialization() throws Exception {
6565

6666
final CloseIndexResponse deserializedResponse = new CloseIndexResponse();
6767
try (StreamInput in = out.bytes().streamInput()) {
68-
in.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_8_0_0)));
68+
in.setVersion(randomVersionBetween(random(), Version.V_6_0_0, VersionUtils.getPreviousVersion(Version.V_7_1_0)));
6969
deserializedResponse.readFrom(in);
7070
}
7171
assertThat(deserializedResponse.isAcknowledged(), equalTo(response.isAcknowledged()));

server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ public void testCloseRoutingTableRemovesRoutingTable() {
138138
state = ClusterState.builder(state)
139139
.nodes(DiscoveryNodes.builder(state.nodes())
140140
.add(new DiscoveryNode("old_node", buildNewFakeTransportAddress(), emptyMap(),
141-
new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_1_0))
141+
new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_0_0))
142142
.add(new DiscoveryNode("new_node", buildNewFakeTransportAddress(), emptyMap(),
143-
new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_8_0_0)))
143+
new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_7_1_0)))
144144
.build();
145145

146146
state = MetaDataIndexStateService.closeRoutingTable(state, blockedIndices, results);
@@ -244,6 +244,14 @@ public void testAddIndexClosedBlocks() {
244244
ClusterState state = addOpenedIndex("index-1", randomIntBetween(1, 3), randomIntBetween(0, 3), initialState);
245245
state = addOpenedIndex("index-2", randomIntBetween(1, 3), randomIntBetween(0, 3), state);
246246
state = addOpenedIndex("index-3", randomIntBetween(1, 3), randomIntBetween(0, 3), state);
247+
final boolean mixedVersions = randomBoolean();
248+
if (mixedVersions) {
249+
state = ClusterState.builder(state)
250+
.nodes(DiscoveryNodes.builder(state.nodes())
251+
.add(new DiscoveryNode("old_node", buildNewFakeTransportAddress(), emptyMap(),
252+
new HashSet<>(Arrays.asList(DiscoveryNode.Role.values())), Version.V_6_0_0)))
253+
.build();
254+
}
247255

248256
Index index1 = state.metaData().index("index-1").getIndex();
249257
Index index2 = state.metaData().index("index-2").getIndex();
@@ -255,7 +263,21 @@ public void testAddIndexClosedBlocks() {
255263

256264
for (Index index : indices) {
257265
assertTrue(blockedIndices.containsKey(index));
258-
assertHasBlock(index.getName(), updatedState, blockedIndices.get(index));
266+
if (mixedVersions) {
267+
IndexMetaData indexMetaData = updatedState.metaData().index(index);
268+
assertThat(indexMetaData.getState(), is(IndexMetaData.State.CLOSE));
269+
Settings indexSettings = indexMetaData.getSettings();
270+
assertThat(indexSettings.hasValue(MetaDataIndexStateService.VERIFIED_BEFORE_CLOSE_SETTING.getKey()), is(false));
271+
assertTrue(updatedState.blocks().hasIndexBlock(index.getName(), MetaDataIndexStateService.INDEX_CLOSED_BLOCK));
272+
assertThat("Index must have only 1 block with [id=" + MetaDataIndexStateService.INDEX_CLOSED_BLOCK_ID + "]",
273+
updatedState.blocks().indices().getOrDefault(index.getName(), emptySet()).stream()
274+
.filter(block -> block.id() == MetaDataIndexStateService.INDEX_CLOSED_BLOCK_ID).count(), equalTo(1L));
275+
assertThat("Index routing table should have been removed when closing the index on mixed cluster version",
276+
updatedState.routingTable().index(index), nullValue());
277+
} else {
278+
assertIsOpened(index.getName(), updatedState);
279+
assertHasBlock(index.getName(), updatedState, blockedIndices.get(index));
280+
}
259281
}
260282
}
261283
}

server/src/test/java/org/elasticsearch/index/engine/NoOpEngineTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void testNoOpEngineDocStats() throws Exception {
126126
deletions += 1;
127127
}
128128
}
129-
engine.waitForOpsToComplete(numDocs + deletions - 1);
129+
engine.getLocalCheckpointTracker().waitForOpsToComplete(numDocs + deletions - 1);
130130
flushAndTrimTranslog(engine);
131131
}
132132

server/src/test/java/org/elasticsearch/index/shard/IndexShardIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ public void testNoOpEngineFactoryTakesPrecedence() {
921921
ensureGreen();
922922

923923
assertAcked(client().admin().indices().prepareClose(indexName));
924+
ensureGreen();
924925

925926
final ClusterService clusterService = getInstanceFromNode(ClusterService.class);
926927
final ClusterState clusterState = clusterService.state();

server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void testIndexStateShardChanged() throws Throwable {
212212
assertThat(stateChangeListenerNode1.afterCloseSettings.getAsInt(SETTING_NUMBER_OF_SHARDS, -1), equalTo(6));
213213
assertThat(stateChangeListenerNode1.afterCloseSettings.getAsInt(SETTING_NUMBER_OF_REPLICAS, -1), equalTo(1));
214214

215-
if (Version.CURRENT.onOrAfter(Version.V_8_0_0)) {
215+
if (Version.CURRENT.onOrAfter(Version.V_7_1_0)) {
216216
assertShardStatesMatch(stateChangeListenerNode1, 6, CLOSED, CREATED, RECOVERING, POST_RECOVERY, STARTED);
217217
assertShardStatesMatch(stateChangeListenerNode2, 6, CLOSED, CREATED, RECOVERING, POST_RECOVERY, STARTED);
218218
} else {

0 commit comments

Comments
 (0)