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

Necessity of history query workaround due to "Rails bug which causes infinite loop" #190

Open
confiks opened this issue Dec 2, 2015 · 2 comments

Comments

@confiks
Copy link

confiks commented Dec 2, 2015

In commit bf3a53f a workaround in the history method of adapters/active_record.rb was introduced that sorts the array outside of ActiveRecord when the transitions are already loaded. Otherwise a CollectionProxy would be returned, on which you can easily add more conditions and let the database do the work.

I was wondering if this workaround is actually required. I tested this with the first release release of Rails (v4.1.2) which contains said commit (rails/rails@b097ebe), and didn't encounter the infinite loop mentioned, nor did I using Rails v4.2.4.

@hmac
Copy link
Contributor

hmac commented Feb 21, 2017

I think this is a good point. It might be worth getting rid of that workaround in the next major release, and seeing if anyone is still hitting it.

@Sinjo
Copy link
Contributor

Sinjo commented May 15, 2017

I've opened #247 as a precursor to this. Once we've officially dropped support for old Ruby/Rails versions, we may be in a better place to do this.

The one caveat is that 4.2 is still supported, and we don't have a policy on compatibility for Rails patch releases. We'll also need to decide on one before we pull this workaround out.

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

No branches or pull requests

3 participants