Skip to content

Commit 031a174

Browse files
authored
[ML] fixing bwc for trained model deployment inference (#88289) (#88315)
When the internal objects were renamed, an inappropriate bwc version restriction was put in place. This commit fixes this by allowing trained model assignment metadata updates to be serialized to nodes > 8.0.0. This is OK as the object serialization handles its BWC conditions when serializing over the wire. This closes: #87959
1 parent dc31d03 commit 031a174

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public String getWriteableName() {
127127

128128
@Override
129129
public Version getMinimalSupportedVersion() {
130-
return Version.V_8_3_0;
130+
return Version.V_8_0_0;
131131
}
132132

133133
@Override
@@ -265,7 +265,7 @@ public String getWriteableName() {
265265

266266
@Override
267267
public Version getMinimalSupportedVersion() {
268-
return Version.V_8_3_0;
268+
return Version.V_8_0_0;
269269
}
270270

271271
@Override

x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/MLModelDeploymentsUpgradeIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ public void testTrainedModelDeployment() throws Exception {
7979
request.addParameter("timeout", "70s");
8080
}));
8181
waitForDeploymentStarted(modelId);
82-
assertInfer(modelId);
83-
assertInfer(modelId);
82+
// attempt inference on new and old nodes multiple times
83+
for (int i = 0; i < 10; i++) {
84+
assertInfer(modelId);
85+
}
8486
}
8587
case UPGRADED -> {
8688
ensureHealth(".ml-inference-*,.ml-config*", (request -> {

0 commit comments

Comments
 (0)