Bug 7373 - ConflictingModificationAppliedException: Node was 99/49399/2
authorAnil Vishnoi <vishnoianil@gmail.com>
Thu, 15 Dec 2016 01:49:17 +0000 (17:49 -0800)
committerSam Hague <shague@redhat.com>
Thu, 15 Dec 2016 15:53:17 +0000 (10:53 -0500)
commit7f779eb28f576e99ea12201429cc3098863d99c0
tree627f8e6d81b51ad98e710a24564f29b3cb922ffd
parent2f94612bdbed0604c17077732c594f6387ffed93
Bug 7373 - ConflictingModificationAppliedException: Node was
created by other transaction

Ovsdb/Hwvtep plugin creates respective topology under network-topology/topology
and also they make a check if the parent node (network-topology) exist or not.
If not they create the root node. In a scenario where user loads both the
plugin together, their is a possibility that both the plugin can try to
create the network-topology as the same time and one of them will end up
with ConflictingModificationAppliedException. To resolve this scenario
this patch avoid the explcit create of the parent node, and uses the md-sal
PUT api that creates the missing parents. Although it's slow compared to
the other version of PUT api, but given that it's one time operation
at warm up time, it of not much concern.

Change-Id: I9171f17ceef43040d91e75e368ab4e6f59970c59
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
Signed-off-by: Sam Hague <shague@redhat.com>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java