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

Release ActiveRecord connections on yield #66

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Release ActiveRecord connections on yield #66

merged 1 commit into from
Mar 11, 2024

Conversation

rsamoilov
Copy link
Member

this improves performance in the case when an application sends a query to the DB (for instance, to check the validity of an API token) and then sends an HTTP request. Without this change the AR connection would hang unavailable for other fibers until the HTTP request is finished.

this improves performance in the case when an application sends a query to the DB (for instance, to check the validity of an API token) and
then sends an HTTP request. Without this change the AR connection would hang unavailable for other fibers until the HTTP request is finished.
@rsamoilov rsamoilov merged commit 41990bd into master Mar 11, 2024
5 checks passed
@rsamoilov rsamoilov deleted the ar-yield branch March 11, 2024 16:28
rsamoilov added a commit that referenced this pull request Apr 28, 2024
something has changed in AR 7.1, and releasing the connections on yield doesn't work reliably anymore. At the moment, I've got neither time nor motivation to look into what's happened there, and as much as I'm not happy about it, currently, the solution is to disable this behaviour for AR 7.1+.

ref: #66
@rsamoilov rsamoilov mentioned this pull request Sep 1, 2024
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.

1 participant