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

Revert "Merge pull request #48069 from Shopify/ar-exec-query-flush-cache #48188

Merged
merged 1 commit into from
May 10, 2023

Conversation

eileencodes
Copy link
Member

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.

cc/ @casperisfine @byroot (for visibility)
cc/ @adrianna-chang-shopify for tracking

…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 eileencodes merged commit 6adaeb8 into rails:main May 10, 2023
@eileencodes eileencodes deleted the revert-48069 branch May 10, 2023 18:44
@casperisfine
Copy link
Contributor

Thanks Eileen. I'll reintroduce these changes next week.

eileencodes added a commit to eileencodes/rails that referenced this pull request May 15, 2023
This reverts commit 6adaeb8, reversing
changes made to a792a62.

We're going to forward fix this in our application rather than keep this
revert in. Reverting other changes has turned out to be too difficult to
get back to a state where our application is retrying queries.
eileencodes added a commit that referenced this pull request May 15, 2023
Revert "Merge pull request #48188 from eileencodes/revert-48069"
davinlagerroos pushed a commit to umn-asr/oracle-enhanced that referenced this pull request Feb 14, 2024
We can't call @raw_connection right away anymore, because it is nil until
it is used after the changes in rails/rails#44576.

Also we need to have @lock established in order to be able to use
`with_raw_connection`. In the abstract_adapter implementation, that happens
after the arel_visitor is set, but in oracle enhanced, we need to use
`with_raw_connection` to check the database version in order to pick with
visitor to use. Calling lock_thread = nil before super means @lock isi
available to set the arel_visitor.

Rails rails/rails#48188 also requires an internal_exec_query
method that is called by the abstract adpater's exec_query. Naively renaming
the oracle-enhanced's exec_query to internal_exec_query makes the test run,
but there is probably more to be done here.
davinlagerroos pushed a commit to umn-asr/oracle-enhanced that referenced this pull request Feb 14, 2024
We can't call @raw_connection right away anymore, because it is nil until
it is used after the changes in rails/rails#44576
and rails/rails#44591.

Also we need to have @lock established in order to be able to use
`with_raw_connection`. In the abstract_adapter implementation, that happens
after the arel_visitor is set, but in oracle enhanced, we need to use
`with_raw_connection` to check the database version in order to pick with
visitor to use. Calling lock_thread = nil before super means @lock isi
available to set the arel_visitor.

Rails rails/rails#48188 also requires an internal_exec_query
method that is called by the abstract adpater's exec_query. Naively renaming
the oracle-enhanced's exec_query to internal_exec_query makes the oracle
enhanced tests run.

I also saw errors due to `active?` using @raw_connection. `valid_raw_connection`
ends up calling `active?` via `with_raw_connection` and `verify` so that
can't be used as a replacement for @raw_connection here. Borrowing from
the postgres adapter implementation to get around this.
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.

2 participants