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

commented Jul 8, 2019

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

Fixes #36587

Heinrich Lee Yu
Fix query cache when using shared connections
Enables the query cache on the correct connection when
shared connections across threads are enabled

@rails-bot rails-bot bot added the activerecord label Jul 8, 2019

@engwan

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

@eileencodes Can you take a look?

@eileencodes eileencodes merged commit f4a094a into rails:master Jul 10, 2019

2 checks passed

buildkite/rails Build #62065 passed (8 minutes, 53 seconds)
Details
codeclimate All good!
Details

eileencodes added a commit that referenced this pull request Jul 10, 2019

Merge pull request #36618 from engwan/fix-query-cache-with-shared-ar-…
…connection

Fix query cache when using shared connections

eileencodes added a commit that referenced this pull request Jul 10, 2019

Merge pull request #36618 from engwan/fix-query-cache-with-shared-ar-…
…connection

Fix query cache when using shared connections

eileencodes added a commit that referenced this pull request Jul 10, 2019

Merge pull request #36618 from engwan/fix-query-cache-with-shared-ar-…
…connection

Fix query cache when using shared connections
@eileencodes

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

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

@engwan

This comment has been minimized.

Copy link
Author

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
2 participants
You can’t perform that action at this time.