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

Make Adapter#exec_query clear the query cache #48069

Merged
merged 1 commit into from Apr 26, 2023

Conversation

casperisfine
Copy link
Contributor

Followup: #48061

It's public API and we can't assume whether the query is read only so we should clear the cache.

To perform read only queries, select and select_all can be used.

It's public API and we can't assume whether the query is read only
so we should clear the cache.

To perform read only queries, `select` and `select_all` can be used.
@byroot byroot merged commit 663df3a into rails:main Apr 26, 2023
9 checks passed
@casperisfine casperisfine deleted the ar-exec-query-flush-cache branch April 26, 2023 11:54
eileencodes added a commit to eileencodes/rails that referenced this pull request May 10, 2023
…sh-cache"

This reverts commit 663df3a, reversing
changes made to 9b4fff2.

The changes here forced our code through a different codepath,
circumventing the patch on `execute` to retry queries. Since we also
patch `execute` from Semian it's not clear the correct path forward and
we're going to revert for now.
eileencodes added a commit that referenced this pull request May 10, 2023
Revert "Merge pull request #48069 from Shopify/ar-exec-query-flush-cache
BuonOmo added a commit to cockroachdb/activerecord-cockroachdb-adapter that referenced this pull request Mar 3, 2024
Follows rails changes introduced in
[rails/rails#48069][rails_pr].
The `exec_query` now flushes the schema cache.
As we now our queries do not alter this cache,
we'd rather not flush.

Might fix #320

[rails_pr]: rails/rails#48069
rafiss pushed a commit to cockroachdb/activerecord-cockroachdb-adapter that referenced this pull request Mar 28, 2024
Follows rails changes introduced in
[rails/rails#48069][rails_pr].
The `exec_query` now flushes the schema cache.
As we now our queries do not alter this cache,
we'd rather not flush.

Might fix #320

[rails_pr]: rails/rails#48069
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.

None yet

2 participants