From 054d60fd44d26a703e1f83a70697c2eeaead84b5 Mon Sep 17 00:00:00 2001 From: lihui Date: Wed, 13 May 2020 14:16:26 +0800 Subject: [PATCH] [TD-161] --- src/client/src/tscAsync.c | 9 ++++----- src/vnode/src/vnodeMain.c | 5 +---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index 14f242ddd4..813c456152 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -425,11 +425,10 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) { if ((pQueryInfo->type & TSDB_QUERY_TYPE_STABLE_SUBQUERY) == TSDB_QUERY_TYPE_STABLE_SUBQUERY) { STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); - - code = tscGetTableMeta(pSql, pTableMetaInfo); - pRes->code = code; - - if (code == TSDB_CODE_ACTION_IN_PROGRESS) return; + if (pTableMetaInfo->pTableMeta == NULL){ + code = tscGetTableMeta(pSql, pTableMetaInfo); + assert(code == TSDB_CODE_SUCCESS); + } assert((tscGetNumOfTags(pTableMetaInfo->pTableMeta) != 0) && pTableMetaInfo->vgroupIndex >= 0 && pSql->param != NULL); diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 77afb7bf29..8d35be9640 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -265,10 +265,7 @@ void vnodeRelease(void *pVnodeRaw) { int32_t vgId = pVnode->vgId; int32_t refCount = atomic_sub_fetch_32(&pVnode->refCount, 1); - if (refCount < 0) { - vTrace("vgId:%d, other thread is releasing vnode, refCount:%d", vgId, refCount); - return; // avoid two threads dec ref count - } + assert(refCount >= 0); if (refCount > 0) { vTrace("vgId:%d, release vnode, refCount:%d", vgId, refCount); -- GitLab