Skip to content

Commit

Permalink
sairedis: Fixing race condition for rif counters
Browse files Browse the repository at this point in the history
* Fixing issue #11621
* The cleanup code for stale rif counters are now moved to syncd . Earlier as part of fix for issue #2193 the cleanup for stale rif counters was added.
* But it could create a race condition between orchagent removes RIF rate counters from DB and lua script fetching them.
* So as a fix all such cleanup has been moved to syncd.

Signed-off-by: Suman Kumar <suman.kumar@broadcom.com>
  • Loading branch information
sumanbrcm committed Oct 27, 2022
1 parent 2585a1f commit d664f98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions syncd/FlexCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,7 @@ void FlexCounter::removeCounter(
{
if (hasCounterContext(COUNTER_TYPE_RIF))
{
removeDataFromCountersDB(vid, ":RIF");
getCounterContext(COUNTER_TYPE_RIF)->removeObject(vid);
}
}
Expand Down

0 comments on commit d664f98

Please sign in to comment.