Skip to content

Commit 3d234e4

Browse files
author
Shuotian Cheng
authored
[orchagent]: Periodically check all m_toSync map in each while iteration (sonic-net#220)
If it is checked only in TIMEOUT case, the blocked tasks will not be processed if there are continuous incoming messages.
1 parent f5f6f67 commit 3d234e4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

orchagent/orchdaemon.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,6 @@ void OrchDaemon::start()
124124

125125
if (ret == Select::TIMEOUT)
126126
{
127-
/* After every TIMEOUT, periodically check all m_toSync map to
128-
* execute all the remaining tasks that need to be retried. */
129-
for (Orch *o : m_orchList)
130-
o->doTask();
131-
132127
/* Let sairedis to flush all SAI function call to ASIC DB.
133128
* Normally the redis pipeline will flush when enough request
134129
* accumulated. Still it is possible that small amount of
@@ -140,6 +135,14 @@ void OrchDaemon::start()
140135

141136
Orch *o = getOrchByConsumer((ConsumerStateTable *)s);
142137
o->execute(((ConsumerStateTable *)s)->getTableName());
138+
139+
/* After each iteration, periodically check all m_toSync map to
140+
* execute all the remaining tasks that need to be retried. */
141+
142+
/* TODO: Abstract Orch class to have a specific todo list */
143+
for (Orch *o : m_orchList)
144+
o->doTask();
145+
143146
}
144147
}
145148

0 commit comments

Comments
 (0)