[ML] Don't try to gracefully shut down the controller on unsupported platforms (elastic/x-pack-elasticsearch#1384)
It just wastes 20 seconds while we timeout trying to open named pipes that cannot
possibly have been created.
Original commit: elastic/x-pack-elasticsearch@4e447874f6200f02b6286ebeedf5e409c8eedfef
@@ -28,10 +28,12 @@ public class MlLifeCycleService extends AbstractComponent {
public synchronized void stop() {
try {
+ if (MachineLearningFeatureSet.isRunningOnMlPlatform(false)) {
NativeController nativeController = NativeControllerHolder.getNativeController(settings);
if (nativeController != null) {
nativeController.stop();
}
+ }
} catch (IOException e) {
// We're stopping anyway, so don't let this complicate the shutdown sequence
}
