Skip to content

Commit

Permalink
Merge "Fix corner case in RoutePathReplicator" into R2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 12, 2015
2 parents 9e95fa8 + eedf0d9 commit fc41579
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bgp/routing-instance/routepath_replicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,20 @@ void RoutePathReplicator::DeleteTableState(BgpTable *table) {
delete ts;
}

//
// Enqueue BgpTable to unregister list if the TableState is empty.
//
// Skip if the BgpTable is still on the bulk sync list. This can
// happen if we're called from the bgp::Config Task and a previous
// walk is still in progress.
//
void RoutePathReplicator::UnregisterTableState(BgpTable *table) {
CHECK_CONCURRENCY("bgp::Config", "db::DBTable");
const TableState *ts = FindTableState(table);
if (!ts->empty())
return;
if (bulk_sync_.find(table) != bulk_sync_.end())
return;
unreg_table_list_.insert(table);
unreg_trigger_->Set();
}
Expand Down

0 comments on commit fc41579

Please sign in to comment.