Skip to content

Commit eea7b38

Browse files
qiluo-msftdaall
authored andcommitted
Revert: swss: flush g_asicState after each event is done sonic-net#570 (sonic-net#1478)
**What I did** Revert sonic-net#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/sonic-buildimage#5570
1 parent bd4d146 commit eea7b38

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
@@ -467,6 +467,12 @@ void OrchDaemon::start()
467467

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

@@ -480,14 +486,6 @@ void OrchDaemon::start()
480486
for (Orch *o : m_orchList)
481487
o->doTask();
482488

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

0 commit comments

Comments
 (0)