From a09378a4db084835bbaf2d221b2c977e58ffe544 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 30 Jul 2020 17:02:42 +0800 Subject: [PATCH] [td-225] refactors --- src/query/src/qExecutor.c | 10 +++++----- src/vnode/src/vnodeRead.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index fb13972689..66762a1ca5 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6670,9 +6670,9 @@ void qQueryMgmtNotifyClosed(void* pQMgmt) { SQueryMgmt* pQueryMgmt = pQMgmt; qDebug("vgId:%d, set querymgmt closed, wait for all queries cancelled", pQueryMgmt->vgId); - pthread_mutex_lock(&pQueryMgmt->lock); +// pthread_mutex_lock(&pQueryMgmt->lock); pQueryMgmt->closed = true; - pthread_mutex_unlock(&pQueryMgmt->lock); +// pthread_mutex_unlock(&pQueryMgmt->lock); taosCacheRefresh(pQueryMgmt->qinfoPool, queryMgmtKillQueryFn); } @@ -6710,16 +6710,16 @@ void** qRegisterQInfo(void* pMgmt, uint64_t qInfo) { return NULL; } - pthread_mutex_lock(&pQueryMgmt->lock); +// pthread_mutex_lock(&pQueryMgmt->lock); if (pQueryMgmt->closed) { - pthread_mutex_unlock(&pQueryMgmt->lock); +// pthread_mutex_unlock(&pQueryMgmt->lock); qError("QInfo:%p failed to add qhandle into cache, since qMgmt is colsing", (void *)qInfo); return NULL; } else { uint64_t handleVal = (uint64_t) qInfo; void** handle = taosCachePut(pQueryMgmt->qinfoPool, &handleVal, sizeof(int64_t), &qInfo, POINTER_BYTES, DEFAULT_QHANDLE_LIFE_SPAN); - pthread_mutex_unlock(&pQueryMgmt->lock); +// pthread_mutex_unlock(&pQueryMgmt->lock); return handle; } diff --git a/src/vnode/src/vnodeRead.c b/src/vnode/src/vnodeRead.c index 066770e1bb..3c642b5098 100644 --- a/src/vnode/src/vnodeRead.c +++ b/src/vnode/src/vnodeRead.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include +//#include #include "os.h" #include "tglobal.h" -- GitLab