Skip to content

Commit b9084a7

Browse files
authored
Revert: swss: flush g_asicState after each event is done sonic-net#570 (sonic-net#1478)
**What I did** Revert sonic-net/sonic-swss#570 We should only `flush` the orchagent/syncd communication channel when there is no active tasks in orchagent. This will not influence the end-to-end performance in long run but introduce SELECT_TIMEOUT (1 s) latency if there is remaining data left inside the orchagent/syncd communication channel after previous `flush`, which is not a big deal. Fix sonic-net#5570
1 parent d6e15e9 commit b9084a7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

orchagent/orchdaemon.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ void OrchDaemon::start()
466466

467467
if (ret == Select::TIMEOUT)
468468
{
469+
/* Let sairedis to flush all SAI function call to ASIC DB.
470+
* Normally the redis pipeline will flush when enough request
471+
* accumulated. Still it is possible that small amount of
472+
* requests live in it. When the daemon has nothing to do, it
473+
* is a good chance to flush the pipeline */
474+
flush();
469475
continue;
470476
}
471477

@@ -479,14 +485,6 @@ void OrchDaemon::start()
479485
for (Orch *o : m_orchList)
480486
o->doTask();
481487

482-
/* Let sairedis to flush all SAI function call to ASIC DB.
483-
* Normally the redis pipeline will flush when enough request
484-
* accumulated. Still it is possible that small amount of
485-
* requests live in it. When the daemon has finished events/tasks, it
486-
* is a good chance to flush the pipeline before next select happened.
487-
*/
488-
flush();
489-
490488
/*
491489
* Asked to check warm restart readiness.
492490
* Not doing this under Select::TIMEOUT condition because of

0 commit comments

Comments
 (0)