Skip to content

Commit

Permalink
Adjust deprecate index versions (elastic#117523)
Browse files Browse the repository at this point in the history
Adjust the deprecation index check to support the backport version in 8.x.

Relates elastic#117183
  • Loading branch information
dnhatn authored Nov 25, 2024
1 parent e5b9b7e commit 0f5eb0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ private static Version parseUnchecked(String version) {
public static final IndexVersion ADD_ROLE_MAPPING_CLEANUP_MIGRATION = def(8_518_00_0, Version.LUCENE_9_12_0);
public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT_BACKPORT = def(8_519_00_0, Version.LUCENE_9_12_0);
public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID_BACKPORT = def(8_520_00_0, Version.LUCENE_9_12_0);
public static final IndexVersion V8_DEPRECATE_SOURCE_MODE_MAPPER = def(8_521_00_0, Version.LUCENE_9_12_0);
public static final IndexVersion UPGRADE_TO_LUCENE_10_0_0 = def(9_000_00_0, Version.LUCENE_10_0_0);
public static final IndexVersion LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT = def(9_001_00_0, Version.LUCENE_10_0_0);
public static final IndexVersion TIME_BASED_K_ORDERED_DOC_ID = def(9_002_00_0, Version.LUCENE_10_0_0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,7 @@ public boolean isStored() {
}

public static boolean onOrAfterDeprecateModeVersion(IndexVersion version) {
return version.onOrAfter(IndexVersions.DEPRECATE_SOURCE_MODE_MAPPER);
// Adjust versions after backporting.
// || version.between(IndexVersions.BACKPORT_DEPRECATE_SOURCE_MODE_MAPPER, IndexVersions.UPGRADE_TO_LUCENE_10_0_0);
return version.onOrAfter(IndexVersions.DEPRECATE_SOURCE_MODE_MAPPER)
|| version.between(IndexVersions.V8_DEPRECATE_SOURCE_MODE_MAPPER, IndexVersions.UPGRADE_TO_LUCENE_10_0_0);
}
}

0 comments on commit 0f5eb0c

Please sign in to comment.