Skip to content

Commit

Permalink
move memory CB check into try block to catch exception and hand to li…
Browse files Browse the repository at this point in the history
…stener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>
  • Loading branch information
HenryL27 committed Mar 22, 2024
1 parent 624dfba commit 82bbdf4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ public void registerMLRemoteModel(
MLTask mlTask,
ActionListener<MLRegisterModelResponse> listener
) {
checkAndAddRunningTask(mlTask, maxRegisterTasksPerNode);
try (ThreadContext.StoredContext context = client.threadPool().getThreadContext().stashContext()) {
checkAndAddRunningTask(mlTask, maxRegisterTasksPerNode);
mlStats.getStat(MLNodeLevelStat.ML_REQUEST_COUNT).increment();
mlStats.createCounterStatIfAbsent(mlTask.getFunctionName(), REGISTER, ML_ACTION_REQUEST_COUNT).increment();
mlStats.getStat(MLNodeLevelStat.ML_EXECUTING_TASK_COUNT).increment();
Expand Down

0 comments on commit 82bbdf4

Please sign in to comment.