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

fix for sync up job not working in 2.17 when upgraded from previous versions #3241

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ private void queryRunningModels(ActionListener<SearchResponse> listener) {
private void triggerModelRedeploy(ModelAutoRedeployArrangement modelAutoRedeployArrangement) {
if (modelAutoRedeployArrangement == null) {
log.info("No more models in arrangement, skipping the redeployment");
redeployAModel();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we redeploy the model if modelAutoRedeployArrangement is null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method calls for redeploying the next model. Not the same one. Ideally if this is null, this condition should have been satisfied and triggerModelRedeploy shouldn't be called. Alternatively we can call startCronjobAndClearListener() here as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to startCronjobAndClearListener method call.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you add an else to this if to ensure the cronjob started in edge cases, e.g. user deleted all the models in the index.

return;
}
String modelId = modelAutoRedeployArrangement.getSearchResponse().getId();
Expand All @@ -275,10 +276,12 @@ private void triggerModelRedeploy(ModelAutoRedeployArrangement modelAutoRedeploy
"Model function_name or algorithm is null, model is not in correct status, please check the model, model id is: {}",
modelId
);
redeployAModel();
return;
}
if (FunctionName.REMOTE == FunctionName.from(functionName)) {
log.info("Skipping redeploying remote model {} as remote model deployment can be done at prediction time.", modelId);
redeployAModel();
return;
}
List<String> planningWorkerNodes = (List<String>) sourceAsMap.get(MLModel.PLANNING_WORKER_NODES_FIELD);
Expand All @@ -302,6 +305,7 @@ private void triggerModelRedeploy(ModelAutoRedeployArrangement modelAutoRedeploy
.info(
"Allow custom deployment plan is true and deploy to all nodes is false and added nodes are not in planning worker nodes list, not to auto redeploy the model to the new nodes!"
);
redeployAModel();
return;
}

Expand Down
Loading