Skip to content

Commit

Permalink
Avoid resetting feature states before 7.13.0 (elastic#100423)
Browse files Browse the repository at this point in the history
This API was introduced in 7.13.0, we cannot call it on earlier nodes.
  • Loading branch information
DaveCTurner authored Oct 6, 2023
1 parent 7ab9c67 commit 87b1815
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,14 @@ protected boolean preserveTemplatesUponCompletion() {
*/
protected boolean resetFeatureStates() {
try {
final Version minimumNodeVersion = minimumNodeVersion();
// Reset feature state API was introduced in 7.13.0
if (minimumNodeVersion.before(Version.V_7_13_0)) {
return false;
}

// ML reset fails when ML is disabled in versions before 8.7
if (isMlEnabled() == false && minimumNodeVersion().before(Version.V_8_7_0)) {
if (isMlEnabled() == false && minimumNodeVersion.before(Version.V_8_7_0)) {
return false;
}
} catch (IOException e) {
Expand Down

0 comments on commit 87b1815

Please sign in to comment.