Skip to content

Commit 33b3851

Browse files
authored
sairedis: Fixing race condition for rif counters (sonic-net#1136)
* 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 <[email protected]>
1 parent 60d2fbd commit 33b3851

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

syncd/FlexCounter.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,7 @@ void FlexCounter::removeCounter(
15211521
{
15221522
if (hasCounterContext(COUNTER_TYPE_RIF))
15231523
{
1524+
removeDataFromCountersDB(vid, ":RIF");
15241525
getCounterContext(COUNTER_TYPE_RIF)->removeObject(vid);
15251526
}
15261527
}

0 commit comments

Comments
 (0)