-
Notifications
You must be signed in to change notification settings - Fork 464
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
Question - children_count = -1 #521
Comments
Hello @stevieing I haven't seen the children_count issue you speak, but I tend not to use the cached columns. It may have something to do with deleting all records or the parent caching the value. I think I imagine the value being too big rather than too small, but fixing one may fix the other. Maybe it is deleting one while it is deleting all in a separate thread? Rails 6 has changed the way that scopes are implemented, removing "leaky scopes" so that has thrown ancestry for a little spin. It will not be a problem until 6.1 but in the mean time, a number of deprecation warnings come to play. Most (or all) deprecation messages are presented with I would upgrade ancestry before upgrading to rails 6.0. The latest is backwards compatible and works better in the rails 6.0 world. But I tend to want to upgrade as much as possible before making the switch - which I guess has the potential to draw out the transition/upgrade process. |
Hello @kbrock Thanks for the prompt reply. I have a few things I can try. Thankfully it is not a data integrity issue but is causing a bit of nervousness amongst our customers. |
Thanks for the gem. We have been using it for a while now successfully.
I am asking this as a question as I am not sure if this is a bug, known issue or application dependent and how to test it.
During the past nine months usage of our application has exploded and recently we have had reports of records with a children_count of -1.
I originally disputed that this was an issue at all but have found a couple today. I have a few strategies for mitigation but was wondering if this was something that people have encountered and if so what they did about it?
The users are visiting a page within our application to remove all of the child records at once and there is a method to do that.
If I do discover it as a bug with the gem I will happily open an issue with tests etc.
Looking through the repo I have noticed a few comments with regard to changes made in Rails 6. Would it be worth upgrading to Rails 6 first (we are running 5.2)?
Thanks in advance.
The text was updated successfully, but these errors were encountered: