Comment 13 for bug 1622618

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/25185
Committed: http://github.org/Juniper/contrail-controller/commit/a6be0b0377e617caf2e24f59db57d7edc0ec28be
Submitter: Zuul
Branch: R3.2

commit a6be0b0377e617caf2e24f59db57d7edc0ec28be
Author: Nischal Sheth <email address hidden>
Date: Mon Oct 10 11:43:16 2016 -0700

Handle more than 1 level of resolution in PathResolver

The code didn't previously handle the scenario where a BgpRoute with
one or more resolved paths is itself used to resolve ResolverPaths.
This scenario caused a concurrency issue wherein one partition was
attempting to modify a BgpRoute (by adding/deleting resolved paths)
while another partition was trying to access the same BgpRoute (to
get the BgpPaths to use as nexthops).

Fix by introducing a read-write mutex in the ResolverRouteState to
serialize access to the corresponding BgpRoute. Take a write lock
on the ResolverRouteState for the BgpRoute being modified and a read
lock on the ResolverRouteState for the BgpRoute to the nexthop.

Change-Id: I485e197ee92d4ba2347d136fecaec29b0c068b65
Closes-Bug: 1622618