Explorar el Código

Move `MlConfigVersion.getMinMlConfigVersion` call under try-catch block (#105391)

Przemysław Witek hace 1 año
padre
commit
a0ed9ba73e

+ 5 - 0
docs/changelog/105391.yaml

@@ -0,0 +1,5 @@
+pr: 105391
+summary: Catch all the potential exceptions in the ingest processor code
+area: Machine Learning
+type: bug
+issues: []

+ 1 - 1
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/ingest/InferenceProcessor.java

@@ -381,8 +381,8 @@ public class InferenceProcessor extends AbstractProcessor {
 
         @Override
         public void accept(ClusterState state) {
-            minNodeVersion = MlConfigVersion.getMinMlConfigVersion(state.nodes());
             try {
+                minNodeVersion = MlConfigVersion.getMinMlConfigVersion(state.nodes());
                 currentInferenceProcessors = InferenceProcessorInfoExtractor.countInferenceProcessors(state);
             } catch (Exception ex) {
                 // We cannot throw any exception here. It might break other pipelines.