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

Chunked FieldUsageStatsResponse #91942

Merged
merged 2 commits into from
Nov 25, 2022

Conversation

original-brownbear
Copy link
Member

These responses can become extremely large, chunk them.

These responses can become extremely large, chunk them.
@original-brownbear original-brownbear added >non-issue :Distributed Coordination/Network Http and internode communication implementations v8.7.0 labels Nov 25, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Nov 25, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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);
Copy link
Contributor

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

Suggested change
final int indices = randomIntBetween(1, 100);
final int indices = randomIntBetween(0, 100);

Comment on lines 50 to 53
while (iterator.hasNext()) {
iterator.next();
chunks++;
}
Copy link
Contributor

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.

@original-brownbear
Copy link
Member Author

Thanks David!

@original-brownbear original-brownbear merged commit 2e6f9a9 into elastic:main Nov 25, 2022
@original-brownbear original-brownbear deleted the chunk-field-stats branch November 25, 2022 18:51
@original-brownbear original-brownbear restored the chunk-field-stats branch November 30, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Network Http and internode communication implementations >non-issue Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants