Skip to content

Commit

Permalink
[copporch]: fix the endless loop problem when removing copp table gro…
Browse files Browse the repository at this point in the history
…up. (#1038)

Signed-off-by: wangshengjun <wangshengjun@asterfusion.com>
  • Loading branch information
wangshengjun authored and lguohan committed Oct 16, 2019
1 parent 1623219 commit 731a8f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,13 +628,15 @@ void CoppOrch::doTask(Consumer &consumer)
it = consumer.m_toSync.erase(it);
break;
case task_process_status::task_failed:
it = consumer.m_toSync.erase(it);
SWSS_LOG_ERROR("Processing copp task item failed, exiting. ");
return;
case task_process_status::task_need_retry:
SWSS_LOG_ERROR("Processing copp task item failed, will retry.");
it++;
break;
default:
it = consumer.m_toSync.erase(it);
SWSS_LOG_ERROR("Invalid task status:%d", task_status);
return;
}
Expand Down

0 comments on commit 731a8f5

Please sign in to comment.