From 0c30d77ab39d3c119a32512b2a28884702f757f2 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Mon, 9 Dec 2019 01:40:21 +0800 Subject: [PATCH] fix bugs for high throughput of query request --- src/system/detail/src/vnodeQueryProcess.c | 10 +++++----- src/system/detail/src/vnodeShell.c | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/system/detail/src/vnodeQueryProcess.c b/src/system/detail/src/vnodeQueryProcess.c index cec76d1cba..6fa0891baa 100644 --- a/src/system/detail/src/vnodeQueryProcess.c +++ b/src/system/detail/src/vnodeQueryProcess.c @@ -1213,8 +1213,8 @@ void vnodeSingleMeterQuery(SSchedMsg *pMsg) { dTrace("QInfo:%p reset signature", pQInfo); - TSDB_QINFO_RESET_SIG(pQInfo); sem_post(&pQInfo->dataReady); + TSDB_QINFO_RESET_SIG(pQInfo); return; } @@ -1235,8 +1235,8 @@ void vnodeSingleMeterQuery(SSchedMsg *pMsg) { dTrace("QInfo:%p reset signature", pQInfo); - TSDB_QINFO_RESET_SIG(pQInfo); sem_post(&pQInfo->dataReady); + TSDB_QINFO_RESET_SIG(pQInfo); return; } } @@ -1247,8 +1247,8 @@ void vnodeSingleMeterQuery(SSchedMsg *pMsg) { pMeterObj->vnode, pMeterObj->sid, pMeterObj->meterId, pQInfo->pointsRead); vnodePrintQueryStatistics(pQInfo->pMeterQuerySupporter); - TSDB_QINFO_RESET_SIG(pQInfo); sem_post(&pQInfo->dataReady); + TSDB_QINFO_RESET_SIG(pQInfo); return; } @@ -1284,8 +1284,8 @@ void vnodeSingleMeterQuery(SSchedMsg *pMsg) { pQInfo, pMeterObj->vnode, pMeterObj->sid, pMeterObj->meterId, pQuery->pointsRead); } - TSDB_QINFO_RESET_SIG(pQInfo); sem_post(&pQInfo->dataReady); + TSDB_QINFO_RESET_SIG(pQInfo); } void vnodeMultiMeterQuery(SSchedMsg *pMsg) { @@ -1335,6 +1335,6 @@ void vnodeMultiMeterQuery(SSchedMsg *pMsg) { vnodePrintQueryStatistics(pSupporter); } - TSDB_QINFO_RESET_SIG(pQInfo); sem_post(&pQInfo->dataReady); + TSDB_QINFO_RESET_SIG(pQInfo); } diff --git a/src/system/detail/src/vnodeShell.c b/src/system/detail/src/vnodeShell.c index 512f675da4..5eea6632af 100644 --- a/src/system/detail/src/vnodeShell.c +++ b/src/system/detail/src/vnodeShell.c @@ -473,7 +473,7 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) { if (numOfRows == 0 && (pRetrieve->qhandle == (uint64_t)pObj->qhandle) && (code != TSDB_CODE_ACTION_IN_PROGRESS)) { dTrace("QInfo:%p %s free qhandle code:%d", pObj->qhandle, __FUNCTION__, code); - vnodeFreeQInfoInQueue(pObj->qhandle); + vnodeFreeQInfo(pObj->qhandle); pObj->qhandle = NULL; } @@ -481,8 +481,6 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) { _exit: free(pSched->msg); - - return; } int vnodeProcessRetrieveRequest(char *pMsg, int msgLen, SShellObj *pObj) { -- GitLab