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

feat: use current connnection instead of the one in ActiveRecord::Base #90

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

seuros
Copy link
Member

@seuros seuros commented Jan 21, 2024

This fix an issue with multi database setups where the uncached is not respecting the current database.

ActiveRecord::Base could not be configured or connected to another database.

TODO: test multiple database setup.

@seuros seuros merged commit c28a172 into master Feb 8, 2024
75 checks passed
@seuros seuros deleted the dummy2 branch February 8, 2024 05:48
@thelowlypeon
Copy link

hi! any idea when this/5.2.0 will be released?

@seuros
Copy link
Member Author

seuros commented Jan 9, 2025

While the code is ready for release, I've identified a critical issue that needs to be addressed soon. The multiple connection functionality currently only works properly when using the same database adapter across connections.

Using different adapters simultaneously (such as MySQL and PostgreSQL) can lead to unexpected behavior.
I've build a solution that will require a significant rewrite of the connection handling. As noted in issue #103, this change will remove support for SQLite3 since it lacks native locking capabilities.

Please let me know if you're seeing any issues with the master branch, and I'll proceed with a release once I receive your feedback.

@thelowlypeon
Copy link

@seuros thanks for the details! we thought we were having an issue related to using multiple databases, but discovered we were actually just making a mistake (we were passing transaction: true when not in a transaction). we do have multiple databases, but haven't had any problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants