Prevent deadlock when updating PCEP stats when Tx chain fails 69/91069/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:39 +0000 (10:20 +0000)
commite1fdc03475372f111afe7af485f0770fe7e56a75
tree240a386eb6f5ffca81e62f6ac5ad86bf482d9cb1
parent7292b55abe58b83bdf76a49cc4b4bfecce9c7ffc
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