Poison entries outside of main lock 32/82032/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 May 2019 17:42:26 +0000 (19:42 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 16 May 2019 14:14:26 +0000 (14:14 +0000)
commita8fa0eeb173402295e92a986022a61d9cad090d0
treeba9e4a12f00dc30e483889cf7c938b670085fa67
parentcf2733ffbd30feaed4e318ea1f8da4e6bd076597
Poison entries outside of main lock

Poisoning entries may involve reaction from their callbacks, which
can attempt to circle back through connections.

Make sure we poison them outside of lock context, so that any
callbacks end up seeing a poisoned connection, but without the lock
being held -- hence the locks can be acquired in-order.

JIRA: CONTROLLER-1893
Change-Id: I26551d052307812e76f3e45024a77dbb83312b17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e983d61d93fe2da50f9c4112fa28c7fe4ee5ffef)
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/TransmitQueue.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/AbstractTransmitQueueTest.java