Fix NPE while accessing DomTxChain when bgp/app peer singleton service is restarted 08/86008/3
authorAjay Lele <alele@luminanetworks.com>
Thu, 29 Aug 2019 21:37:58 +0000 (14:37 -0700)
committerAjay Lele <ajayslele@gmail.com>
Wed, 27 Nov 2019 04:20:16 +0000 (20:20 -0800)
commit678eb7d8895024e87dbf201a3cc957be5ba50841
tree13fde06a96a1c3225a477b187588ad1b2dbdf90e
parent258371023cfa0b4293f23de4a4eb2782fa82cf7b
Fix NPE while accessing DomTxChain when bgp/app peer singleton service is restarted

Due to cluster partition/heal, singleton service associated with bgp/app
peer instance can get restarted. Create/close of DomTxChain instance used
by the service was not being handled properly resulting in NPE and failure
to register the peer which caused the BGP connection to not get reestablished.

JIRA: BGPCEP-878
Change-Id: I436ad0877db19c65463bf7b7e09faa3b2b42e5a0
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5efe6160e57bc846831dbbe7dd88b8a30c33919a)
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ApplicationPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/config/BgpPeer.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/config/AppPeerTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/config/BgpPeerTest.java