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/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
  • Loading branch information
qiluo-msft authored Nov 5, 2020
1 parent d6e15e9 commit b9084a7
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 @@ -466,6 +466,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 @@ -479,14 +485,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 b9084a7

Please sign in to comment.