Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Undeploy models with no WorkerNodes #3447

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport 18bcaae from #3380

* undeploy models with no WorkerNodes

This commit aims to undeploy modelIds that have no nodes associated to them so as to keep the intention of undeploy truthful.

Signed-off-by: Brian Flores <[email protected]>

# Conflicts:
#	plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelsAction.java

* Exit early when no nodes service the model

Now when entering this method its guaranteed to write to index first before sending back the MLUndeploy response. And will also send back a exception if the write back fails

Signed-off-by: Brian Flores <[email protected]>

* add UTs for undeploy stale model index fix

Added UTs for the 2 scenarios 1. Check that the bulk operation occured when no nodes are returned from the Undeploy response is , 2. Check that the bulk operation did not occur when there are nodes that have found the model within their cache.

Signed-off-by: Brian Flores <[email protected]>

* update code change with comment explaining the change

Signed-off-by: Brian Flores <[email protected]>

* add context stash/restore to write operation

Signed-off-by: Brian Flores <[email protected]>

* Apply spotless

Signed-off-by: Brian Flores <[email protected]>

* Add better logging to write request

Signed-off-by: Brian Flores <[email protected]>

* wrap exception into 5xx

Signed-off-by: Brian Flores <[email protected]>

* adapts undeploy code change to multi-tenancy feature

Signed-off-by: Brian Flores <[email protected]>

* applies spotless

Signed-off-by: Brian Flores <[email protected]>

---------

Signed-off-by: Brian Flores <[email protected]>
(cherry picked from commit 18bcaae)
@Zhangxunmt Zhangxunmt merged commit 431c31b into 2.x Jan 28, 2025
7 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants