From 9bc81582463c9a9c2072280e0f046814107980d7 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 2 Aug 2020 21:33:05 +0800 Subject: [PATCH 1/2] Modify the incorrect use of tqueue --- src/mnode/src/mnodeSdb.c | 2 +- src/util/src/tqueue.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index 301dd41cbc..efca748e9f 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -988,7 +988,7 @@ int32_t sdbAllocWriteQueue() { } void sdbFreeWritequeue() { - taosCloseQset(tsSdbWriteQueue); + taosCloseQueue(tsSdbWriteQueue); taosFreeQall(tsSdbWriteQall); taosCloseQset(tsSdbWriteQset); tsSdbWriteQall = NULL; diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index e2f0614455..8c6d6243eb 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -241,7 +241,6 @@ void taosCloseQset(taos_qset param) { if (param == NULL) return; STaosQset *qset = (STaosQset *)param; -#if 0 // remove all the queues from qset pthread_mutex_lock(&qset->mutex); while (qset->head) { @@ -252,7 +251,6 @@ void taosCloseQset(taos_qset param) { queue->next = NULL; } pthread_mutex_unlock(&qset->mutex); -#endif pthread_mutex_destroy(&qset->mutex); tsem_destroy(&qset->sem); From ce3d4a79a600b7b044b0171eca3948320428c7d9 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 2 Aug 2020 21:37:40 +0800 Subject: [PATCH 2/2] minor changes --- src/rpc/src/rpcMain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index be609c4ee8..01c753ec5b 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -747,7 +747,8 @@ static SRpcConn *rpcGetConnObj(SRpcInfo *pRpc, int sid, SRecvInfo *pRecv) { if (pConn) { if (pConn->linkUid != pHead->linkUid) { terrno = TSDB_CODE_RPC_MISMATCHED_LINK_ID; - tError("%s %p %p, linkUid:0x%x is not matched with received:0x%x", pRpc->label, pConn, (void*)pHead->ahandle, pConn->linkUid, pHead->linkUid); + tDebug("%s %p %p, linkUid:0x%x is not matched with received:0x%x", pRpc->label, pConn, (void *)pHead->ahandle, + pConn->linkUid, pHead->linkUid); pConn = NULL; } }