-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Clean up & streamline RestIndicesAction #93437
Clean up & streamline RestIndicesAction #93437
Conversation
- No need to wait for the get-settings call to return before sending the other requests. - No need to request cluster health at all, we can compute this locally from the cluster state. - No need to get the entire cluster state, we only need the metadata and routing table. - No need to put all the responses into an untyped list and then cast them out again.
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, thanks for fixing my messy code 😞
@@ -99,7 +99,7 @@ public RefCountingListener(int maxExceptions, ActionListener<Void> delegate) { | |||
assert false : maxExceptions; | |||
throw new IllegalArgumentException("maxExceptions must be positive"); | |||
} | |||
this.delegate = Objects.requireNonNull(delegate); | |||
this.delegate = ActionListener.assertOnce(Objects.requireNonNull(delegate)); |
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.
👍
Guess who didn't even compile the tests before opening this? 🤡 |
Similar to elastic#93437 we can run all the sub-requests in parallel.
Similar to #93437 we can run all the sub-requests in parallel.
No need to wait for the get-settings call to return before sending the other requests.
No need to request cluster health at all, we can compute this locally from the cluster state.
No need to get the entire cluster state, we only need the metadata and routing table.
No need to put all the responses into an untyped list and then cast them out again.