diff --git a/docs/changelog/100886.yaml b/docs/changelog/100886.yaml new file mode 100644 index 0000000000000..b926f924c7a7c --- /dev/null +++ b/docs/changelog/100886.yaml @@ -0,0 +1,5 @@ +pr: 100886 +summary: Use the correct writable name for model assignment metadata in mixed version clusters. Prevents a node failure due to IllegalArgumentException Unknown NamedWriteable [trained_model_assignment] +area: Machine Learning +type: bug +issues: [] diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentMetadata.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentMetadata.java index 8391d287a6847..aabedfc4351b5 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentMetadata.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentMetadata.java @@ -309,7 +309,8 @@ private TrainedModeAssignmentDiff(final StreamInput in, String writeableName) th @Override public Metadata.Custom apply(Metadata.Custom part) { return new TrainedModelAssignmentMetadata( - new TreeMap<>(modelRoutingEntries.apply(((TrainedModelAssignmentMetadata) part).deploymentRoutingEntries)) + new TreeMap<>(modelRoutingEntries.apply(((TrainedModelAssignmentMetadata) part).deploymentRoutingEntries)), + writeableName ); }