From bf6361ac930bb641f7afd70d9ada861ba8f83c64 Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Fri, 29 Nov 2024 10:37:05 +0800 Subject: [PATCH] Fix ci errors. --- source/libs/transport/src/transCli.c | 6 +++++- tests/script/tsim/valgrind/checkError1.sim | 2 +- .../system-test/0-others/test_hot_refresh_configurations.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 8377a1456d..9e9e874bf7 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -652,6 +652,7 @@ void cliHandleResp(SCliConn* conn) { } if ((code = transDecompressMsg((char**)&pHead, &msgLen)) < 0) { + taosMemoryFree(pHead); tDebug("%s conn %p recv invalid packet, failed to decompress", CONN_GET_INST_LABEL(conn), conn); // TODO: notify cb return; @@ -664,8 +665,10 @@ void cliHandleResp(SCliConn* conn) { if (cliHandleState_mayHandleReleaseResp(conn, pHead)) { if (cliMayRecycleConn(conn)) { + taosMemoryFree(pHead); return; } + taosMemoryFree(pHead); return; } code = cliGetReqBySeq(conn, seq, pHead->msgType, &pReq); @@ -674,6 +677,7 @@ void cliHandleResp(SCliConn* conn) { if (code == 0) { code = cliBuildRespFromCont(NULL, &resp, pHead); code = cliNotifyCb(conn, NULL, &resp); + taosMemoryFree(pHead); return; } if (code != 0) { @@ -701,7 +705,7 @@ void cliHandleResp(SCliConn* conn) { tGDebug("%s conn %p %s received from %s, local info:%s, len:%d, seq:%" PRId64 ", sid:%" PRId64 ", code:%s", CONN_GET_INST_LABEL(conn), conn, TMSG_INFO(resp.msgType), conn->dst, conn->src, pHead->msgLen, seq, qId, tstrerror(pHead->code)); - + taosMemoryFree(pHead); code = cliNotifyCb(conn, pReq, &resp); if (code == TSDB_CODE_RPC_ASYNC_IN_PROCESS) { tGWarn("%s msg need retry", CONN_GET_INST_LABEL(conn)); diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index 5629fbb4bd..b7b04a030f 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -120,7 +120,7 @@ if $rows != 3 then endi sql show variables; -if $rows != 9 then +if $rows != 94 then return -1 endi diff --git a/tests/system-test/0-others/test_hot_refresh_configurations.py b/tests/system-test/0-others/test_hot_refresh_configurations.py index da218162d4..47f5209940 100644 --- a/tests/system-test/0-others/test_hot_refresh_configurations.py +++ b/tests/system-test/0-others/test_hot_refresh_configurations.py @@ -224,7 +224,8 @@ class TDTestCase: for i in range(len(values)): v = values[i] dnode = random.choice(p_list) - tdSql.execute(f'alter {dnode} "{name} {v}";') + tdSql.execute(f'alter all dnodes "{name} {v}";') + sleep(0.5) value = self.svr_get_param_value(name) tdLog.debug(f"value: {value}") if check_values: