use "\n" instead of semicolon to separate redis commands in a c++ string#954
use "\n" instead of semicolon to separate redis commands in a c++ string#954liuh-80 merged 2 commits intosonic-net:masterfrom
Conversation
replace ";" with "\n"
|
@liuh-80 , @qiluo-msft , can you merge this? |
|
/azp run Azure.sonic-swss-common |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@qiluo-msft , @liuh-80 , @yuezhoujk , please explain motivation of such change. |
We see such an exception when running the testcase in the azure pipeline: C++ exception with description "RedisReply catches system_error: command: *3\r\n$6\r\nSCRIPT\r\n$4\r\nLOAD\r\n$52\r\nredis.call('PUBLISH', 'ROUTE_TABLE_CHANNEL@0', 'G');\r\n, reason: Expected to get redis type 1 got type 3, err: NON-STRING-REPLY: Input/output error: Input/output error" thrown in SetUp(). which indicates that the redis server fails to do SCRIPT LOAD, although it works on our end. We checked the c++ string it could be successfully loaded into script on our end, but throws exception in the azure pipeline. |
replace ";" with "\n" when concatenating multiple redis cmds