-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Chunked FieldUsageStatsResponse #91942
Chunked FieldUsageStatsResponse #91942
Conversation
These responses can become extremely large, chunk them.
Pinging @elastic/es-distributed (Team:Distributed) |
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 mod a couple of test comments
public class FieldUsageStatsResponseTests extends ESTestCase { | ||
|
||
public void testToXContentChunkPerIndex() { | ||
final int indices = randomIntBetween(1, 100); |
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.
May as well check this corner case too
final int indices = randomIntBetween(1, 100); | |
final int indices = randomIntBetween(0, 100); |
while (iterator.hasNext()) { | ||
iterator.next(); | ||
chunks++; | ||
} |
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.
I suggest writing the chunks to an actual builder to verify they produce a well-formed document.
Thanks David! |
These responses can become extremely large, chunk them.