BUG-5280: fix race proxy creation and reconnect 05/49705/2
authorRobert Varga <rovarga@cisco.com>
Wed, 21 Dec 2016 15:11:09 +0000 (16:11 +0100)
committerRobert Varga <rovarga@cisco.com>
Wed, 21 Dec 2016 15:19:23 +0000 (16:19 +0100)
commit457556047a855fdcf5fcc0570bc94b2d322997c2
treebf0b1211739e65b58b913cdff6fe246b7a56bb68
parentdf085d42892442a3bea3e72626c9476a14404316
BUG-5280: fix race proxy creation and reconnect

ProxyHistory map insertions have to happen-before or
happen-after the reconnect attempt. This is mostly take care
of by client's inversible lock, except for the race window
when the connection lookup succeeds and the history map
is updated.

Resolve this by introducing a StampedLock, which is used
to establish order of these operations, covering the entire
createHistoryProxy() method.

Change-Id: Ibdee739c94f3a48bef3f7fb19cd2f041c0061fe2
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHistory.java