diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index a00ea68bd0c176501a01e309890f06c6c24fd79a..2622246111894caf39f3c1c37923d1a7207935b6 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1372,13 +1372,6 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) { // retrieve actual query results from vnode during the second stage join subquery if (pParentSql->res.code != TSDB_CODE_SUCCESS) { tscError("%p abort query due to other subquery failure. code:%d, global code:%d", pSql, code, pParentSql->res.code); - - if (!(pTableMetaInfo->vgroupIndex > 0 && tscNonOrderedProjectionQueryOnSTable(pQueryInfo, 0))) { - if (atomic_sub_fetch_32(&pParentSql->subState.numOfRemain, 1) > 0) { - return; - } - } - quitAllSubquery(pParentSql, pSupporter); tscAsyncResultOnError(pParentSql); @@ -1391,13 +1384,6 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) { tscError("%p abort query, code:%s, global code:%s", pSql, tstrerror(code), tstrerror(pParentSql->res.code)); pParentSql->res.code = code; - - if (!(pTableMetaInfo->vgroupIndex > 0 && tscNonOrderedProjectionQueryOnSTable(pQueryInfo, 0))) { - if (atomic_sub_fetch_32(&pParentSql->subState.numOfRemain, 1) > 0) { - return; - } - } - quitAllSubquery(pParentSql, pSupporter); tscAsyncResultOnError(pParentSql); diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 493b8091e93b59f823b11fc021365c9aa90e620c..7ccb7db935e37bb2472384f031ad4b9d144135fd 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -444,7 +444,7 @@ int32_t tStrToInteger(const char* z, int16_t type, int32_t n, int64_t* value, bo #define TSDB_PORT_HTTP 11 #define TSDB_PORT_ARBITRATOR 12 -#define TSDB_MAX_WAL_SIZE (1024*1024*2) +#define TSDB_MAX_WAL_SIZE (1024*1024*3) typedef enum { TAOS_QTYPE_RPC = 0, diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 4978a27d4f415a95f70b60aa2fd1b419a786c2b8..90cd74de72f6b47b7bf99b6055d4a4c5e9cfa7ab 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6932,11 +6932,12 @@ static size_t getResultSize(SQInfo *pQInfo, int64_t *numOfRows) { */ if (isTSCompQuery(pQuery) && (*numOfRows) > 0) { struct stat fStat; - if (fstat(fileno(*(FILE **)pQuery->sdata[0]->data), &fStat) == 0) { + FILE *f = *(FILE **)pQuery->sdata[0]->data; + if ((f != NULL) && (fstat(fileno(f), &fStat) == 0)) { *numOfRows = fStat.st_size; return fStat.st_size; } else { - qError("QInfo:%p failed to get file info, path:%s, reason:%s", pQInfo, pQuery->sdata[0]->data, strerror(errno)); + qError("QInfo:%p failed to get file info, file:%p, reason:%s", pQInfo, f, strerror(errno)); return 0; } } else { @@ -6951,7 +6952,7 @@ static int32_t doDumpQueryResult(SQInfo *pQInfo, char *data) { // load data from file to msg buffer if (isTSCompQuery(pQuery)) { - FILE *f = *(FILE **)pQuery->sdata[0]->data; + FILE *f = *(FILE **)pQuery->sdata[0]->data; // TODO refactor // make sure file exist if (f) { diff --git a/src/sync/src/syncRetrieve.c b/src/sync/src/syncRetrieve.c index 9ff79553517a7328b3fad66e35530eac1f4985bc..c7017c1af88b32afb1e448720fe2d710fe131c97 100644 --- a/src/sync/src/syncRetrieve.c +++ b/src/sync/src/syncRetrieve.c @@ -474,7 +474,8 @@ void *syncRetrieveData(void *param) { SSyncNode *pNode = pPeer->pSyncNode; taosBlockSIGPIPE(); - sInfo("%s, start to retrieve data, sstatus:%s", pPeer->id, syncStatus[pPeer->sstatus]); + sInfo("%s, start to retrieve data, sstatus:%s, numOfRetrieves:%d", pPeer->id, syncStatus[pPeer->sstatus], + pPeer->numOfRetrieves); if (pNode->notifyFlowCtrl) (*pNode->notifyFlowCtrl)(pNode->vgId, pPeer->numOfRetrieves); @@ -496,9 +497,11 @@ void *syncRetrieveData(void *param) { pPeer->numOfRetrieves++; } else { pPeer->numOfRetrieves = 0; - if (pNode->notifyFlowCtrl) (*pNode->notifyFlowCtrl)(pNode->vgId, 0); + // if (pNode->notifyFlowCtrl) (*pNode->notifyFlowCtrl)(pNode->vgId, 0); } + if (pNode->notifyFlowCtrl) (*pNode->notifyFlowCtrl)(pNode->vgId, 0); + pPeer->fileChanged = 0; taosCloseSocket(pPeer->syncFd); diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index 90b1e91979fb6b54bd4c15d53a5505e98837ac7b..49aabde0e76acb3c15f1b426a134b9f145c8fabe 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -308,7 +308,7 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) { if (pVnode->flowctrlLevel <= 0) code = TSDB_CODE_VND_IS_FLOWCTRL; pWrite->processedCount++; - if (pWrite->processedCount > 100) { + if (pWrite->processedCount >= 100) { vError("vgId:%d, msg:%p, failed to process since %s, retry:%d", pVnode->vgId, pWrite, tstrerror(code), pWrite->processedCount); pWrite->processedCount = 1;