Skip to content

Commit 1f857d5

Browse files
sihuihan88lguohan
authored andcommitted
[buffermgr]: remove the item from consumer queue if invalid (sonic-net#489)
* [buffermgr]: remove the item from consumer queue if invalid Signed-off-by: Sihui Han <[email protected]> * change error to task_invalid_entry Signed-off-by: Sihui Han <[email protected]>
1 parent ea34b92 commit 1f857d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cfgmgr/buffermgr.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ task_process_status BufferMgr::doSpeedUpdateTask(string port, string speed)
126126
{
127127
SWSS_LOG_ERROR("Unable to create/update PG profile for port %s. No PG profile configured for speed %s and cable length %s",
128128
port.c_str(), speed.c_str(), cable.c_str());
129-
return task_process_status::task_failed;
129+
return task_process_status::task_invalid_entry;
130130
}
131131

132132
// Crete record in BUFFER_PROFILE table
@@ -222,6 +222,10 @@ void BufferMgr::doTask(Consumer &consumer)
222222
SWSS_LOG_INFO("Unable to process table update. Will retry...");
223223
++it;
224224
break;
225+
case task_process_status::task_invalid_entry:
226+
SWSS_LOG_ERROR("Failed to process invalid entry, drop it");
227+
it = consumer.m_toSync.erase(it);
228+
break;
225229
default:
226230
it = consumer.m_toSync.erase(it);
227231
break;

0 commit comments

Comments
 (0)