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

Bug Report: Incorrect sync.Pool usage in compressed transaction payload handling #17044

Closed
mattlord opened this issue Oct 22, 2024 · 0 comments · Fixed by #17042
Closed

Bug Report: Incorrect sync.Pool usage in compressed transaction payload handling #17044

mattlord opened this issue Oct 22, 2024 · 0 comments · Fixed by #17042

Comments

@mattlord
Copy link
Contributor

Overview of the Issue

In #16328 we added usage of sync.Pool, however when putting the object back in the pool we used the wrong pool. Instead of using the statelessDocoderPool we were using another sync.Pool instance that also existed in the package: readersPool.

This caused the statelessDocoderPool to NOT be used, but worse than that it could cause a panic when the readersPool was used here IF --mysql-server-pool-conn-read-buffers was set (defaults to false): https://github.com/planetscale/vitess/blob/4522a0ad8930f3556627ec1ebbe69103f3b0fc01/go/mysql/conn.go#L290-L292

h/t to @mattrobenolt for noticing this mistake! :hear

Reproduction Steps

N/A

Binary Version

vtgate version Version: 22.0.0-SNAPSHOT

Operating System and Environment details

N/A

Log Fragments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant