BUG-5280: Fix deadlock with TransmitQueue 24/50024/4
authorRobert Varga <rovarga@cisco.com>
Wed, 4 Jan 2017 15:10:57 +0000 (16:10 +0100)
committerRobert Varga <rovarga@cisco.com>
Wed, 4 Jan 2017 15:28:49 +0000 (16:28 +0100)
commit4dc3bb90f1db1c4ee3f87d72734bc3de4d1b801e
tree81987d201c5392cc1502b63851ef22f9d9d70d84
parentc4f9bb0e408bfaff5c1730e574e8ef1ebe80ac7b
BUG-5280: Fix deadlock with TransmitQueue

TransmitQueue should not be dispatching responses while
the connection lock is being held, as a that may expose
clients to AB/BA deadlocks if the callback tries to acquire
a lock which is being held by another thread attempting
to touch the same connection (i.e. transmit).

Fix this by TransmitQueue returning the entry to be
completed and AbstractClientConnection checking its
presence and performing actual completion after it has
dropped the connection lock.

Change-Id: Ibbacb641a297bfe7d4790af8401b036285c26593
Signed-off-by: Robert Varga <rovarga@cisco.com>
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