Skip to content

Commit b58c69d

Browse files
dzhangalibabaShuotian Cheng
authored and
Shuotian Cheng
committed
swss-common: add op 'create' case to avoid flush immediately (sonic-net#219)
* create operation is used when writing routes into ASIC_DB * operation create is added to make sure 'create' cases are redis pipelined * with the changes in sairedis and swss, route performance improved by 200~300 routes/sec Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com
1 parent 149f985 commit b58c69d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/producertable.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ void ProducerTable::set(const string &key, const vector<FieldValueTuple> &values
101101
}
102102

103103
enqueueDbChange(key, JSon::buildJson(values), "S" + op, prefix);
104-
// Only buffer continuous "set/set" or "del" operations
105-
if (!m_buffered || (op != "set" && op != "bulkset" ))
104+
// Only buffer "set", "bulkset" or "create" operations
105+
if (!m_buffered || (op != "create" && op != "set" && op != "bulkset" ))
106106
{
107107
m_pipe->flush();
108108
}

0 commit comments

Comments
 (0)