Browse Source

Add missing preventDeletionLock.remove in corner case (#115010) (#115032)

(cherry picked from commit 831d55fcc8354a1798c243f90bc5b0998158d2ae)
Max Hniebergall 1 year ago
parent
commit
6a8d280365

+ 1 - 0
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/registry/ModelRegistry.java

@@ -397,6 +397,7 @@ public class ModelRegistry {
                 logger.error(
                     format("Failed to update inference endpoint [%s] due to [%s]", inferenceEntityId, configResponse.buildFailureMessage())
                 );
+                preventDeletionLock.remove(inferenceEntityId);
                 // Since none of our updates succeeded at this point, we can simply return.
                 finalListener.onFailure(
                     new ElasticsearchStatusException(