Skip to content

Commit

Permalink
Avoid resetting feature states before 7.13.0 (#100423) (#100454)
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 committed Oct 6, 2023
1 parent c9b922f commit 2c9392e
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -546,8 +546,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 2c9392e

Please sign in to comment.