-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Simplify DataNodeRequestSender #126664
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
Simplify DataNodeRequestSender #126664
Conversation
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
| ) { | ||
| final long startTimeInNanos = System.nanoTime(); | ||
| searchShards(rootTask, clusterAlias, requestFilter, concreteIndices, originalIndices, ActionListener.wrap(targetShards -> { | ||
| searchShards(requestFilter, concreteIndices, originalIndices, ActionListener.wrap(targetShards -> { |
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.
Both available as fields, no need to pass them
| take(sent, 3), | ||
| containsInAnyOrder(nodeRequest(node1, shard1, shard5), nodeRequest(node4, shard2), nodeRequest(node2, shard3, shard4)) | ||
| ); | ||
| assertThat(take(sent, 2), containsInAnyOrder(nodeRequest(node2, shard2), nodeRequest(node3, shard5))); |
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.
Lets compare domain objects rather than maps of lists
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.
FWIW you can do matchesMap() and get lovely error messaging. If you want. But I have no objections to comparing any way you like.
| take(sent, 3), | ||
| containsInAnyOrder(nodeRequest(node1, shard1, shard5), nodeRequest(node4, shard2), nodeRequest(node2, shard3, shard4)) | ||
| ); | ||
| assertThat(take(sent, 2), containsInAnyOrder(nodeRequest(node2, shard2), nodeRequest(node3, shard5))); |
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.
FWIW you can do matchesMap() and get lovely error messaging. If you want. But I have no objections to comparing any way you like.
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.
LGTM2
Some cleanups I would like to merge before #126653