Prevent deadlock when updating PCEP stats when Tx chain fails 70/91070/1
authorAjay Lele <ajayslele@gmail.com>
Tue, 26 May 2020 18:05:10 +0000 (11:05 -0700)
committerRobert Varga <nite@hq.sk>
Fri, 17 Jul 2020 10:20:49 +0000 (10:20 +0000)
commit7ccb001210b4e67bb240f3a4eb2b7a7108895f68
tree7aaa9321aa7d50e22c215c0d05ca0b456a25a5ce
parent14364165b6f31dc3662241e6775053759b554c75
Prevent deadlock when updating PCEP stats when Tx chain fails

Multiple threads are blocked on TopologyStatsProviderImpl
instance lock which is held from TopologyStatsProviderImpl#unbind()
which in turn is waiting for delete transaction commit
future to complete. The transaction chain has failed but
the callback TopologyStatsProviderImpl#onTransactionChainFailed()
is blocked on lock held by earlier thread, thus creating a deadlock.
Patch avoids this by registering callback on delete transaction
commit future instead of the blocking call.

JIRA: BGPCEP-901
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Change-Id: I4a65b3dd00fb6f1255bf6eeb8b5f1d03f3b3a182
(cherry picked from commit 2cb352533464b608896336b88e69ddd8f5df0031)
pcep/topology/topology-stats/src/main/java/org/opendaylight/bgpcep/pcep/topology/stats/provider/TopologyStatsProviderImpl.java