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

Add ability to unset preventing writes #36843

Merged

Conversation

eileencodes
Copy link
Member

Previously if an app attempts to do a write inside a read request it will be
impossible to switch back to writing to the primary. This PR adds an
argument to the while_preventing_writes so that we can make sure to
turn it off if we're doing a write on a primary.

Fixes #36830

Co-authored-by: John Crepezzi john.crepezzi@gmail.com

cc/ @tenderlove @jhawthorn @rafaelfranca @matthewd

Previously if an app attempts to do a write inside a read request it will be
impossilbe to switch back to writing to the primary. This PR adds an
argument to the `while_preventing_writes` so that we can make sure to
turn it off if we're doing a write on a primary.

Fixes rails#36830

Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
@eileencodes eileencodes added this to the 6.0.0 milestone Aug 2, 2019
@eileencodes eileencodes merged commit ac7c938 into rails:master Aug 2, 2019
@eileencodes eileencodes deleted the add-ability-to-unset-preventing-writes branch August 2, 2019 17:03
eileencodes added a commit that referenced this pull request Aug 2, 2019
…nting-writes

Add ability to unset preventing writes
@eileencodes
Copy link
Member Author

Backported to 6-0-stable

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.

Rails 6 RC2 multi-db issue under multithreaded environment
1 participant