-
Notifications
You must be signed in to change notification settings - Fork 0
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
Suggestions #1
Suggestions #1
Conversation
@@ -76,7 +76,7 @@ | |||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin; | |||
import static org.elasticsearch.xpack.ml.utils.InferenceProcessorInfoExtractor.pipelineIdsByResource; | |||
|
|||
public class TransportGetTrainedModelsStatsAction extends HandledTransportAction< | |||
public class TransportGetTrainedModelsStatsAction extends TransportAction< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to be a HandledTransportAction
, this action is only ever invoked on the local node AFAICT.
// workaround for https://github.com/elastic/elasticsearch/issues/97916 - TODO remove this when we can | ||
executor.execute(ActionRunnable.wrap(listener, l -> doExecuteForked(task, request, l))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fork the whole thing onto executor
first
l | ||
); | ||
}) | ||
.andThenAccept(tuple -> responseBuilder.setExpandedModelIdsWithAliases(tuple.v2()).setTotalModelCount(tuple.v1())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest using andThenAccept
to split out the handling of the previous step's result from the initiation of the next steps.
deploymentStats.getStats() | ||
.results() | ||
SubscribableListener | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More blank lines makes for better formatting throughout.
Thanks @DaveCTurner! |
No description provided.