BUG-3516: make PingPongTransactionChain.close() asynchronous 79/30079/1
authorRobert Varga <rovarga@cisco.com>
Mon, 8 Jun 2015 18:18:31 +0000 (20:18 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 23 Nov 2015 15:18:22 +0000 (15:18 +0000)
commit91b351d9bca0c0621a464568d815cbe491dec856
treed8ae742f55fadf5004d294704416b71d9526bd13
parent2bf2e52f7001e81608c8219f35a1bf4f637aa5f1
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