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

deprecated clear_stale_active_connections! can call #reap #5393

Merged
merged 1 commit into from
Mar 12, 2012

Conversation

jrochkind
Copy link
Contributor

Not sure about this, sending my question/suggestion in the form of a pull request. Only applies to master, so not an urgent matter, thanks @tenderlove.

The new #reap method accomplishes the same thing as the deprecated #clear_stale_active_connections! , although it uses other means to do it. At least #reap is documented to do the same thing -- remove connections associated with dead threads from the pool.

If you want to deprecate the old method name, that may be reasonable. But why not have it call the new #reap method instead of just no-op'ing? And why not have the deprecation warning suggest the new #reap method? Calling the #reap method instead of no-op'ing seems kinder to applications that are trying to use the deprecated behavior.

Alternately, seems like it would be better to remove the clear_stale_active_connections! method entirely, instead of leaving it as a no-op deprecated method. but personally, I like having it there, deprecated, but calling out to #reap, seems kindest to upgrading clients.

@tenderlove
Copy link
Member

I agree!

tenderlove added a commit that referenced this pull request Mar 12, 2012
deprecated clear_stale_active_connections! can call #reap
@tenderlove tenderlove merged commit 2b05585 into rails:master Mar 12, 2012
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.

None yet

2 participants