Skip to content

Chunked FieldUsageStatsResponse#91942

Merged
original-brownbear merged 2 commits intoelastic:mainfrom
original-brownbear:chunk-field-stats
Nov 25, 2022
Merged

Chunked FieldUsageStatsResponse#91942
original-brownbear merged 2 commits intoelastic:mainfrom
original-brownbear:chunk-field-stats

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

These responses can become extremely large, chunk them.

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

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

Copy link
Copy Markdown
Member

@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
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
Contributor 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/Network Http and internode communication implementations >non-issue Team:Distributed Meta label for distributed team. v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants