Re-create transaction chain upon failure in TopologyStatsProvider 36/96036/1
authorOleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Tue, 27 Apr 2021 17:16:18 +0000 (20:16 +0300)
committerRobert Varga <nite@hq.sk>
Mon, 10 May 2021 19:08:33 +0000 (19:08 +0000)
commit5189d860a31c5997063d8df6c7bba5f3a9f988c3
tree8e56b935e071becbbe0560e38404964d9d64607b
parent888d0198bcc0b2ce453192d06d0a2bf798eca5dd
Re-create transaction chain upon failure in TopologyStatsProvider

Transaction failures can occur as a side-effect of various datastore
failure scenarios. In case of TopologyStatsProviderImpl, such a failure
requires manual intervention to restart the component (and thus
re-establish exports).

Rework transaction chain lifecycle, so that we close it down on failures
and establish a new chain when we need it for the periodic updates
and/or unbind operations.

Since we are modifying lifecycle, also make sure we work in terms of a
TimerTask with an externally-provided timer -- we really do not care how
we are scheduled.

JIRA: BGPCEP-920
Change-Id: I6f2be6a5c14ac6e191988c3b7bfd56b78b94abb6
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 58245c112960839c6615f902edf8ca2cb23becc2)
pcep/topology/topology-stats/pom.xml
pcep/topology/topology-stats/src/main/java/org/opendaylight/bgpcep/pcep/topology/stats/provider/TopologyStatsProviderImpl.java
pcep/topology/topology-stats/src/main/resources/OSGI-INF/blueprint/pcep-stats.xml