Re: [libvirt] [PATCH 2/3] virDomainObjListAddLocked: Produce better error message than 'Duplicate key'

2019-04-03 Thread Cole Robinson
On 3/19/19 9:49 AM, Michal Privoznik wrote: > If there are two concurrent threads, one of which is removing a > domain from the list and the other is trying to add it back they > may serialize in the following order: > > 1) vm->removing is set and @vm is unlocked. > 2) The tread that's trying to a

[libvirt] [PATCH 2/3] virDomainObjListAddLocked: Produce better error message than 'Duplicate key'

2019-03-19 Thread Michal Privoznik
If there are two concurrent threads, one of which is removing a domain from the list and the other is trying to add it back they may serialize in the following order: 1) vm->removing is set and @vm is unlocked. 2) The tread that's trying to add the domain onto the list locks the list and tries