Skip to content

Commit

Permalink
[DropCounter]Fix the ordering issue with dropcounter (sonic-net#3128)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan authored May 1, 2024
1 parent 67e0312 commit 2e6c5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/debugcounterorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ task_process_status DebugCounterOrch::uninstallDebugCounter(const string& counte
string counter_type = counter->getCounterType();
string counter_stat = counter->getDebugCounterSAIStat();

debug_counters.erase(it);
uninstallDebugFlexCounters(counter_type, counter_stat);

if (counter_type == PORT_INGRESS_DROPS || counter_type == PORT_EGRESS_DROPS)
Expand All @@ -347,6 +346,7 @@ task_process_status DebugCounterOrch::uninstallDebugCounter(const string& counte
{
m_counterNameToSwitchStatMap->hdel("", counter_name);
}
debug_counters.erase(it);

SWSS_LOG_NOTICE("Successfully deleted drop counter %s", counter_name.c_str());
return task_process_status::task_success;
Expand Down

0 comments on commit 2e6c5b2

Please sign in to comment.