BUG 5690 : No owner present even when entity has a candidate 68/37368/2
authorMoiz Raja <moraja@cisco.com>
Fri, 8 Apr 2016 18:09:50 +0000 (11:09 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 11 Apr 2016 14:17:08 +0000 (14:17 +0000)
If a candidate for an entity is removed and another added in quick
succession it can leave the owner of the entity blank. This happens
because the BatchedModifications for candidate removal happen one
after another which results in the commit of those modifications.
The BatchedModification which writes an owner on removal is committed
only after the addition of the new candidate. In this scenario when
the new candidate is added it finds that there is still an owner
for that entity and so it does not assign a new owner for that entity.

To fix this problem in onCandidateAdded we check if the currentOwner
is present in the current candidate list and if it is not then we
choose a new owner.

Change-Id: I47f90314e018e25f2c1dac82342b931c4e2d882d
Signed-off-by: Moiz Raja <moraja@cisco.com>

No differences found