-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Tidy up ClusterStatsNodeRequest
#116036
Tidy up ClusterStatsNodeRequest
#116036
Conversation
There was an `@UpdateForV9` on this class saying that it could be replaced with `TransportRequest.Empty`. But that was removed by elastic#109790, and all its non-test usages replaced by trivial implementations of `TransportRequest`. This change therefore just simplifies the class a bit and removes that annotation.
@@ -320,11 +317,6 @@ public ClusterStatsNodeRequest(StreamInput in) throws IOException { | |||
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> headers) { | |||
return new CancellableTask(id, type, action, "", parentTaskId, headers); | |||
} |
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.
Can we remove this override? The effect would be to have it return a plain Task
instead of a CancellableTask
. I don't know if that's safe / desirable. (The createActionContext
method does expect to be passed a CancellableTask
, if that's relevant.)
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, this was added in #68676 as part of making this cancellable
Pinging @elastic/es-data-management (Team:Data Management) |
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.
LGTM
@@ -320,11 +317,6 @@ public ClusterStatsNodeRequest(StreamInput in) throws IOException { | |||
public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String, String> headers) { | |||
return new CancellableTask(id, type, action, "", parentTaskId, headers); | |||
} |
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, this was added in #68676 as part of making this cancellable
There was an `@UpdateForV9` on this class saying that it could be replaced with `TransportRequest.Empty`. But that was removed by elastic#109790, and all its non-test usages replaced by trivial implementations of `TransportRequest`. This change therefore just simplifies the class a bit and removes that annotation.
There was an
@UpdateForV9
on this class saying that it could be replaced withTransportRequest.Empty
. But that was removed by #109790, and all its non-test usages replaced by trivial implementations ofTransportRequest
. This change therefore just simplifies the class a bit and removes that annotation.