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

Tidy up ClusterStatsNodeRequest #116036

Conversation

PeteGillinElastic
Copy link
Member

There was an @UpdateForV9 on this class saying that it could be replaced with TransportRequest.Empty. But that was removed by #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 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);
}
Copy link
Member Author

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.)

Copy link
Member

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

@PeteGillinElastic PeteGillinElastic added :Data Management/Stats Statistics tracking and retrieval APIs >non-issue labels Oct 31, 2024
@PeteGillinElastic PeteGillinElastic marked this pull request as ready for review October 31, 2024 18:36
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Oct 31, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Member

@dakrone dakrone left a 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);
}
Copy link
Member

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

@PeteGillinElastic PeteGillinElastic merged commit e100f88 into elastic:main Nov 1, 2024
16 checks passed
@PeteGillinElastic PeteGillinElastic deleted the v9-cluster-stats-request-objects branch November 1, 2024 11:29
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request Nov 4, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >non-issue Team:Data Management Meta label for data/management team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants