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
Restore connection pools after transactional tests #40384
Merged
eugeneius
merged 1 commit into
rails:main
from
eugeneius:teardown_shared_connection_pool
Apr 21, 2021
Merged
Restore connection pools after transactional tests #40384
eugeneius
merged 1 commit into
rails:main
from
eugeneius:teardown_shared_connection_pool
Apr 21, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eugeneius
force-pushed
the
teardown_shared_connection_pool
branch
from
October 14, 2020 12:36
a27124f
to
02425a8
Compare
eileencodes
added a commit
to seejohnrun/rails
that referenced
this pull request
Oct 21, 2020
Things pass except for the fixture connection tests and one test that is getting too many shards in the list because we're no longer cleaning up connections at the end of the tests. We need a way I think to turn off shared connection pools for the AR tests, or at least when we're not doing multi-connection work. rails#40384 is interesting but I didn't have time to make it work with our stuff. So basically we're in a better state but I'm not quite sure yet how to get just the 2 tests that need shared pools to use them. Thoughts?
eugeneius
force-pushed
the
teardown_shared_connection_pool
branch
from
October 30, 2020 03:06
02425a8
to
5fb3066
Compare
Since b24bfcc, all connection handlers share the primary connection pool during transactional tests to ensure that replica connections can read data written to primary connections. The replica connection pools were never restored, which meant that the behaviour of non-transactional tests depended on whether a transactional test had run first, which could result in nondeterministic failures.
eugeneius
force-pushed
the
teardown_shared_connection_pool
branch
from
November 15, 2020 22:50
5fb3066
to
054e19d
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I think we hit this problem during our upgrade. @eugeneius do you know if the patch is still necessary? |
Yep, we still have workarounds for this problem in our app that I'd like to remove. I'll merge and backport this now. |
eugeneius
added a commit
that referenced
this pull request
Apr 21, 2021
Restore connection pools after transactional tests
eugeneius
added a commit
that referenced
this pull request
Apr 21, 2021
Restore connection pools after transactional tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #34773, all connection handlers share the primary connection pool during transactional tests to ensure that replica connections can read data written to primary connections.
The replica connection pools were never restored, which meant that the behaviour of non-transactional tests depended on whether a transactional test had run first, which could result in nondeterministic failures.