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

[CI] Ensure large response can fit into 3 messages #104729

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Jan 25, 2024

Lower the upper bound of large response size from
2 times of suggestedMaxAllocationSize to 1.5 so that it be sent over with 3 messages. This is because the split threshold is 0.99 of suggestedMaxAllocationSize.

Resolves: #104728

Lower the upper bound of large response size from
2 times of suggestedMaxAllocationSize to 1.5 so that it be sent over
with 3 messages. This is because the split threshold is 0.99 of
suggestedMaxAllocationSize.

Resolves: elastic#104728
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Network Http and internode communication implementations v8.13.0 labels Jan 25, 2024
@ywangd ywangd requested a review from DaveCTurner January 25, 2024 00:06
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Jan 25, 2024
@elasticsearchmachine
Copy link
Collaborator

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

public void testLargeFullResponsesAreSplit() {
final List<Object> messagesSeen = new ArrayList<>();
final var embeddedChannel = new EmbeddedChannel(capturingHandler(messagesSeen), getTestHttpHandler());
embeddedChannel.writeInbound(createHttpRequest("/test"));
final Netty4HttpRequest request = embeddedChannel.readInbound();
final var minSize = (int) NettyAllocator.suggestedMaxAllocationSize();
final var content = new ZeroBytesReference(between(minSize, minSize * 2));
final var content = new ZeroBytesReference(between(minSize, (int) (minSize * 1.5)));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose 1.5 as the upper bound since testSmallFullResponsesAreSentDirectly uses 0.5 as the upper bound.

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.

Ah good catch, thanks Yang

@ywangd ywangd merged commit e0ddb82 into elastic:main Jan 25, 2024
15 checks passed
henningandersen pushed a commit to henningandersen/elasticsearch that referenced this pull request Jan 25, 2024
Lower the upper bound of large response size from
2 times of suggestedMaxAllocationSize to 1.5 so that it be sent over
with 3 messages. This is because the split threshold is 0.99 of
suggestedMaxAllocationSize.

Resolves: elastic#104728
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 Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] Netty4HttpPipeliningHandlerTests testLargeFullResponsesAreSplit failing
3 participants