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

Response byte reuse #13

Merged
merged 7 commits into from
Apr 30, 2024
Merged

Response byte reuse #13

merged 7 commits into from
Apr 30, 2024

Conversation

stlava
Copy link
Member

@stlava stlava commented Apr 25, 2024

This change introduces a new return type for RESP bulk string responses. Instead of returning []byte we return a BytesResponse which stores []byte. The receiver should then call BytesResponse.Release() when they are done reading the response in order to put []byte back into the pool for later re-use.

Edit: note on test failures here, there's a flaky test (false negative) that's happening which is unrelated to these changes.

Base automatically changed from request-from-byte-args to main April 25, 2024 22:45
@stlava stlava force-pushed the response-byte-reuse branch from 3c23f45 to 0c52880 Compare April 30, 2024 17:07
@stlava stlava marked this pull request as ready for review April 30, 2024 18:23
@stlava stlava requested a review from tsingla1998 April 30, 2024 18:38
@stlava stlava merged commit 232af0a into main Apr 30, 2024
4 of 6 checks passed
@stlava stlava deleted the response-byte-reuse branch April 30, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant