Fix unsynchronized LSP counting 05/82905/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 3 Jul 2019 08:40:26 +0000 (10:40 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 3 Jul 2019 08:47:07 +0000 (10:47 +0200)
commit5089a36f11b2f9d249aeca53da867037be26fe1b
treebf35e0769cb85100bb8fae6f081c0fb3de4fe434
parent33708e4bf702cc4d4f0c48f7db27fbdf7ed3dea0
Fix unsynchronized LSP counting

Trying to copy values out of lspData without holding the lock
can result it ConcurrentModificationException and was broken
by the fix for BGPCEP-845.

Restore the lock for the duration of the copy and count the items
outside of the lock.

JIRA: BGPCEP-875
Change-Id: Ic6e839cac51a73c0812aabb58e96cb2f4959c4d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/AbstractTopologySessionListener.java