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

#1167 - do not connect to write adapter when getting the read adapter #1169

Conversation

joshua-bn
Copy link
Contributor

@joshua-bn joshua-bn commented Aug 26, 2020

Description (*)

Do not connect to the write adapter when getting the read adapter. We get the write adapter to check if there are any transactions. This causes it to have to connect to the write connection to do so. Most requests don't actually need that write connection.

Related Pull Requests

None

Fixed Issues (if relevant)

  1. Fixes Don't connect to write connection #1167

Manual testing scenarios (*)

  1. Test if it works - Place a break point in Mage_Core_Model_Resource::_newConnection()
  2. Test if the read adapter is still fetched by going to really any page that is not cached
  3. Test that transactions work by going to a page that does any writes

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added the Component: Core Relates to Mage_Core label Aug 26, 2020
@fballiano
Copy link
Contributor

this is a great contribution and should be merged ASAP

@Flyingmana Flyingmana merged commit 9d0cb18 into OpenMage:1.9.4.x May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Relates to Mage_Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't connect to write connection
4 participants