From d619308a62c7e685102514aaa05e012b6ef09282 Mon Sep 17 00:00:00 2001 From: Aurelien FOUCRET Date: Wed, 10 Apr 2024 11:34:36 +0200 Subject: [PATCH] Create new transport version for the metadata. --- server/src/main/java/org/elasticsearch/TransportVersions.java | 1 + .../xpack/core/ml/inference/TrainedModelCacheMetadata.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/TransportVersions.java b/server/src/main/java/org/elasticsearch/TransportVersions.java index 4a1bf691ea1b0..e3bb831c1ac71 100644 --- a/server/src/main/java/org/elasticsearch/TransportVersions.java +++ b/server/src/main/java/org/elasticsearch/TransportVersions.java @@ -164,6 +164,7 @@ static TransportVersion def(int id) { public static final TransportVersion ESQL_ORDINAL_BLOCK = def(8_623_00_0); public static final TransportVersion ML_INFERENCE_COHERE_RERANK = def(8_624_00_0); public static final TransportVersion INDEXING_PRESSURE_DOCUMENT_REJECTIONS_COUNT = def(8_625_00_0); + public static final TransportVersion ML_TRAINED_MODEL_CACHE_METADATA_ADDED = def(8_626_00_0); /* * STOP! READ THIS FIRST! No, really, diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/TrainedModelCacheMetadata.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/TrainedModelCacheMetadata.java index 0fe0df62e7ed2..748eae034185e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/TrainedModelCacheMetadata.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/TrainedModelCacheMetadata.java @@ -8,6 +8,7 @@ package org.elasticsearch.xpack.core.ml.inference; import org.elasticsearch.TransportVersion; +import org.elasticsearch.TransportVersions; import org.elasticsearch.cluster.AbstractNamedDiffable; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.NamedDiff; @@ -88,7 +89,7 @@ public String getWriteableName() { @Override public TransportVersion getMinimalSupportedVersion() { // TODO: Add a new entry in TransportVersions before merge. - return TransportVersion.current(); + return TransportVersions.ML_TRAINED_MODEL_CACHE_METADATA_ADDED; } @Override