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 query cache when using shared connections #36618

Merged

Conversation

engwan
Copy link

@engwan engwan commented Jul 8, 2019

Enables the query cache on the correct connection when shared connections across threads are enabled.

Fixes #36587

Enables the query cache on the correct connection when
shared connections across threads are enabled
@engwan
Copy link
Author

engwan commented Jul 9, 2019

@eileencodes Can you take a look?

@eileencodes eileencodes merged commit f4a094a into rails:master Jul 10, 2019
eileencodes added a commit that referenced this pull request Jul 10, 2019
…connection

Fix query cache when using shared connections
eileencodes added a commit that referenced this pull request Jul 10, 2019
…connection

Fix query cache when using shared connections
eileencodes added a commit that referenced this pull request Jul 10, 2019
…connection

Fix query cache when using shared connections
@eileencodes
Copy link
Member

Thanks @engwan! I've also backported this to 6-0-stable, 5-2-stable, and 5-1-stable.

@engwan
Copy link
Author

engwan commented Jul 10, 2019

Thanks @eileencodes.

While working on this, I also noticed that #with_connection and #release_connection may need a similar fix. Is this correct or is #with_connection expected to not use the shared connection?

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.

QueryCache not working in Capybara transactional tests
2 participants