-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Conversation
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
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))); |
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 chose 1.5 as the upper bound since testSmallFullResponsesAreSentDirectly
uses 0.5 as the upper bound.
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.
Ah good catch, thanks Yang
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
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