nested_set icon indicating copy to clipboard operation
nested_set copied to clipboard

Concurrency issue

Open vishakhasawant opened this issue 11 years ago • 4 comments

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,

vishakhasawant avatar Aug 06 '13 05:08 vishakhasawant

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.

skyeagle avatar Aug 06 '13 11:08 skyeagle

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.

vishakhasawant avatar Aug 06 '13 12:08 vishakhasawant

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.

skyeagle avatar Aug 06 '13 12:08 skyeagle

Thank you for prompt reply

vishakhasawant avatar Aug 06 '13 12:08 vishakhasawant