Bug 5613 - unregister candidates on node restart 26/36826/4
authorAmit Mandke <ammandke@cisco.com>
Tue, 29 Mar 2016 17:25:29 +0000 (10:25 -0700)
committerAmit Mandke <ammandke@cisco.com>
Thu, 31 Mar 2016 01:23:11 +0000 (18:23 -0700)
commitf93b17ba71874d70af4c243017eed23c3a36e63c
tree9e19f22685e67b7d25d74d908b251d4bef2701de
parent1157d5bc442a5e0fde8ea9ad23ff89042ebe15e7
Bug 5613 - unregister candidates on node restart
When EntityOwnershipShard receives CandidateAdded for local candidate
before any local registration happes it means a restart of a local node
must have happned and the candiates are not registered yet.

So this change removes candidate for such case.

The corresponding test reproduces the issue if the change is not applied.

Fixed other test failures.

Change-Id: I0e8e675530c93dca172ca661fa4c5e1250f40150
Signed-off-by: Amit Mandke <ammandke@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShard.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/AbstractEntityOwnershipTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShardTest.java