-
Notifications
You must be signed in to change notification settings - Fork 902
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
Avoid extra buffer to prepend frame size #3560
Conversation
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
please take a look to tests |
@@ -481,12 +482,14 @@ public ReferenceCounted retain(int increment) { | |||
|
|||
@Override | |||
public ReferenceCounted touch() { | |||
return data.touch(); |
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.
When using the leak checker, this was causing the ReadResponse
to get converted into an instrumented buffer, and the serialization was completely skipped.
@merlimat Would you please take a look at those failed tests? |
* Avoid extra buffer to prepend frame size * Fixed checkstyle * Fixed touch methods on ReadResponse * Fixed frame size for protobuf requests * Removed unwanted changes * Fixed AuthResponse in v2 protocol * Fixed test
* Avoid extra buffer to prepend frame size * Fixed checkstyle * Fixed touch methods on ReadResponse * Fixed frame size for protobuf requests * Removed unwanted changes * Fixed AuthResponse in v2 protocol * Fixed test (cherry picked from commit 02be9d2)
* Avoid extra buffer to prepend frame size * Fixed checkstyle * Fixed touch methods on ReadResponse * Fixed frame size for protobuf requests * Removed unwanted changes * Fixed AuthResponse in v2 protocol * Fixed test (cherry picked from commit 02be9d2)
* Avoid extra buffer to prepend frame size * Fixed checkstyle * Fixed touch methods on ReadResponse * Fixed frame size for protobuf requests * Removed unwanted changes * Fixed AuthResponse in v2 protocol * Fixed test
Motivation
As described in #3559, we should avoid the extra buffer allocation just for prepending the 4 bytes frame size