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

Fix bug in FiberedMysql2Adapter_5_2 where steal! needed to update its owner to Fiber.current #2

Merged
merged 2 commits into from Feb 12, 2021

Conversation

nburwell
Copy link
Contributor

Fixed bug with Rails 5+ adapter where connections that have steal! called on them were not having their owner updated to the current Fiber, which would then cause an exception when trying to expire the connection (this showed up with the Rails 5 ConnectionPool::Reaper that reaps unused connections)

See slack thread

…er to Fiber.current instead of Thread.current
Copy link
Contributor

@ColinDKelley ColinDKelley left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@jebentier jebentier left a comment

Choose a reason for hiding this comment

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

Thank you for taking care of this!

@nburwell nburwell merged commit 858de37 into master Feb 12, 2021
@nburwell nburwell deleted the rails_5_reaping_connections_fix branch February 12, 2021 18:17
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.

None yet

3 participants