Skip to content

Commit

Permalink
Add database update with new view (sonic-net#162)
Browse files Browse the repository at this point in the history
* Add database update with new view

* Refactor apply view
  • Loading branch information
kcudnik authored Feb 17, 2017
1 parent 88736a1 commit 08495fb
Show file tree
Hide file tree
Showing 2 changed files with 372 additions and 393 deletions.
15 changes: 13 additions & 2 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,20 @@ sai_status_t notifySyncd(const std::string& op)

sai_status_t status = syncdApplyView();

// TODO if status is success, clear local db and floating vids

sendResponse(status);

if (status == SAI_STATUS_SUCCESS)
{
/*
* We succesfully applied new view, VID mapping could change, so we
* need to clear local db, and all new VIDs will be queried using
* redis.
*/

floating_vid_set.clear();
local_rid_to_vid.clear();
local_vid_to_rid.clear();
}
}
else
{
Expand Down
Loading

0 comments on commit 08495fb

Please sign in to comment.