-
Notifications
You must be signed in to change notification settings - Fork 16
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
Problems with a lot of create / destroy #1
Comments
I'm not sure. When you say the structure is corrupt, is it corrupt right after the deletes, as in, have you reloaded the objects you are examining for correctness? I haven't had any problems. I'm using a smaller number of items in our case, but I don't see how the number would matter at all (the code either works or it doesn't). Are any exceptions being thrown? |
Hi chris, yes, i reloaded the objects after the deletes.
Then after the creation/destroy i had something like:
Having another group of categories under another child (luckily only for lft and rgt, parent_id wasn't touched so i was able to just run a renumber_full_tree) The only problem i think about is that i got all the categories and then checked them, like Without reloading all the categories, but i think that this isn't the problems as in the before_destroy of the plugin there is a: There weren't any exceptions or other outputs (just that for the destroy it took a while, as there are a lot of records to update, i think) Usually it works correctly when you create/destroy a single object, but having a lot of them it collapsed, i don't know if maybe because the db (mysql), the plugin or what else :) Just an OT question, do you think that there would be problems having a lot (1-2 millions) of children under a single root? |
Hi, i'm using this plugin to manage a structure of categories (one single root with, at now, 12-15000 children). I've noticed that running a simple script which create categories one after one at the end i had all the structure corrupted (lft and rgt not correct). I run a renumber_full_tree and everything went right again.
Then i removed some (~2-3000) categories with another simple script using the destroy method and after some (100-200) i had again all the structure broken. Then i used the delete method and called at the end the renumber_full_tree again, and it went right.
I'm very worried about this because the categories will increase exponentially (like one root and 500'000, 1'000'000 or even more children), and having this trouble would make all the website broken.
Do you know what would it be the cause?
The text was updated successfully, but these errors were encountered: