Skip to content

Commit 2727b1b

Browse files
committed
PR Changes
1 parent e02283f commit 2727b1b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationChecks.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public class DataStreamDeprecationChecks {
2424
static DeprecationIssue oldIndicesCheck(DataStream dataStream, ClusterState clusterState) {
2525
List<Index> backingIndices = dataStream.getIndices();
2626

27-
Set<String> indiciesNeedingUpgrade = backingIndices.stream()
28-
.filter(index -> clusterState.metadata().index(index).getCompatibilityVersion().before(IndexVersions.V_8_0_0))
27+
Set<String> indicesNeedingUpgrade = backingIndices.stream()
28+
.filter(index -> clusterState.metadata().index(index).getCreationVersion().onOrBefore(IndexVersions.UPGRADE_TO_LUCENE_10_0_0))
2929
.map(Index::getName)
3030
.collect(Collectors.toUnmodifiableSet());
3131

32-
if (indiciesNeedingUpgrade.isEmpty() == false) {
32+
if (indicesNeedingUpgrade.isEmpty() == false) {
3333
return new DeprecationIssue(
3434
DeprecationIssue.Level.CRITICAL,
3535
"Old data stream with a compatibility version < 8.0",
@@ -38,9 +38,9 @@ static DeprecationIssue oldIndicesCheck(DataStream dataStream, ClusterState clus
3838
false,
3939
ofEntries(
4040
entry("reindex_required", true),
41-
entry("total_backing_indicies", backingIndices.size()),
42-
entry("indicies_requiring_upgrade_count", indiciesNeedingUpgrade.size()),
43-
entry("indicies_requiring_upgrade", indiciesNeedingUpgrade)
41+
entry("total_backing_indices", backingIndices.size()),
42+
entry("indices_requiring_upgrade_count", indicesNeedingUpgrade.size()),
43+
entry("indices_requiring_upgrade", indicesNeedingUpgrade)
4444
)
4545
);
4646
}

x-pack/plugin/deprecation/src/test/java/org/elasticsearch/xpack/deprecation/DataStreamDeprecationChecksTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ public void testOldIndicesCheck() {
9191
false,
9292
ofEntries(
9393
entry("reindex_required", true),
94-
entry("total_backing_indicies", oldIndexCount + newIndexCount),
95-
entry("indicies_requiring_upgrade_count", oldIndexCount),
94+
entry("total_backing_indices", oldIndexCount + newIndexCount),
95+
entry("indices_requiring_upgrade_count", oldIndexCount),
9696
entry(
97-
"indicies_requiring_upgrade",
97+
"indices_requiring_upgrade",
9898
nameToIndexMetadata.keySet()
9999
.stream()
100100
.filter(name -> name.startsWith("old-data-stream-index-"))

0 commit comments

Comments
 (0)