Skip to content

Commit

Permalink
Revert: swss: flush g_asicState after each event is done sonic-net#570 (
Browse files Browse the repository at this point in the history
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
  • Loading branch information
qiluo-msft authored and daall committed Dec 7, 2020
1 parent bd4d146 commit eea7b38
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@ void OrchDaemon::start()

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

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

/* Let sairedis to flush all SAI function call to ASIC DB.
* Normally the redis pipeline will flush when enough request
* accumulated. Still it is possible that small amount of
* requests live in it. When the daemon has finished events/tasks, it
* is a good chance to flush the pipeline before next select happened.
*/
flush();

/*
* Asked to check warm restart readiness.
* Not doing this under Select::TIMEOUT condition because of
Expand Down

0 comments on commit eea7b38

Please sign in to comment.