BUG-3516: make PingPongTransactionChain.close() asynchronous 57/21557/7
authorRobert Varga <rovarga@cisco.com>
Mon, 8 Jun 2015 18:18:31 +0000 (20:18 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 15 Dec 2015 11:09:25 +0000 (11:09 +0000)
commit1948c5663b2be0f602d34d01d875f3aeec2a5b8d
tree8d15cba0775a801d6e8c671dac2570f4134aad9f
parent78abb818942726a3496af470ab7aa7acd18e7069
BUG-3516: make PingPongTransactionChain.close() asynchronous

When the system is critical loads Thread.yield can bring a long-term
blocking effect for hijacked threads like Netty. We should not be
blocking for prolonged time.

Rework the shutdown logic to be asynchronous, and scheduling the
potential outstanding transaction to complete as appropriate. Also fixes
the case where we would end up not reporting a transaction failure if
the transaction is readied, but was not submitted to the backend.

Change-Id: Ic7796a980d9e87242f70b7f7b9cdb30caeab9dd9
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/PingPongTransactionChain.java