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

vttablet: Better use of vtprotobuf memory pool #9365

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

mattrobenolt
Copy link
Contributor

In the previous implementation, the last iteration of the for loop
leaves behind an object to get GC'd since it never gets released back to
the pool when the function returns.

Also should be a minor optimization by re-using the VStreamRowsResponse
rather than returning it to the pool each iteration.

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

👍

In the previous implementation, the last iteration of the for loop
leaves behind an object to get GC'd since it never gets released back to
the pool when the function returns.

Also should be a minor optimization by re-using the VStreamRowsResponse
rather than returning it to the pool each iteration.

Signed-off-by: Matt Robenolt <matt@ydekproductions.com>
@deepthi deepthi merged commit db63a7b into vitessio:main Jan 11, 2022
@mattrobenolt mattrobenolt deleted the better-pool branch January 11, 2022 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants