nested_set
nested_set copied to clipboard
Concurrency issue
Hi, I have implemented tree structure in our SAAS product using nested_set 1.6.8 version. Over period of time I observed it got corrupted because of the concurrency issue. Right now added table lock on model as temporary fix. I found that awesome_nested_set fixed this issue one year ago. Do this fix is available in nested_set too?
Regards,
Hi! Could you provide some links related to this issue or code parts. I can't imagine what are you talking about without any details provided by you.
Below are the references for this issue: https://github.com/collectiveidea/awesome_nested_set/issues/33 https://github.com/collectiveidea/awesome_nested_set/issues/86
I am having tree structure which can be modified concurrently. If more than one user tries to add node to the existing structure, they are getting same lft,rgt number and I fixed this temporary by adding table level lock.
Ok, thank you. I suppose the issue wasn't backported to nested_set gem. Awesome nested set is actively development at the moment contrary to how it was when the fork was made. So, I would suggest you move on to awesome nested set gem. There is no big difference between them. Thank you for pointing out to that issue. I will think about stopping maintenance of this gem.
Thank you for prompt reply