diff --git a/src/client/src/tscSecondaryMerge.c b/src/client/src/tscSecondaryMerge.c index eac402df86c193a804e8fb4ad37258b27fb5a8fd..d7c0eda746e8e7946628832d3fcabe2155f7d55d 100644 --- a/src/client/src/tscSecondaryMerge.c +++ b/src/client/src/tscSecondaryMerge.c @@ -231,13 +231,13 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd idx += 1; } } - assert(idx >= pReducer->numOfBuffer); + if (idx == 0) { free(pReducer); return; } - pReducer->numOfBuffer = idx; + pReducer->numOfBuffer = idx; // the actual entries that has result for merge SCompareParam *param = malloc(sizeof(SCompareParam)); param->pLocalData = pReducer->pLocalDataSrc; diff --git a/src/rpc/src/trpc.c b/src/rpc/src/trpc.c index d8f0cac87415e2bf94b0a7596d700c8f218e85f1..c8f58db1fe9b442ced0e3c4634c60c66c17a0df8 100755 --- a/src/rpc/src/trpc.c +++ b/src/rpc/src/trpc.c @@ -1184,9 +1184,9 @@ void *taosProcessDataFromPeer(char *data, int dataLen, uint32_t ip, uint16_t por taosTmrReset(taosProcessIdleTimer, pServer->idleTime, pConn, pChann->tmrCtrl, &pConn->pIdleTimer); } - if (code == TSDB_CODE_ALREADY_PROCESSED) { - tTrace("%s cid:%d sid:%d id:%s, %s wont be processed, source:0x%08x dest:0x%08x tranId:%d pConn:%p", pServer->label, - chann, sid, pHeader->meterId, taosMsg[pHeader->msgType], pHeader->sourceId, htonl(pHeader->destId), + if (code == TSDB_CODE_ALREADY_PROCESSED || code == TSDB_CODE_LAST_SESSION_NOT_FINISHED) { + tTrace("%s code:%d, cid:%d sid:%d id:%s, %s wont be processed, source:0x%08x dest:0x%08x tranId:%d pConn:%p", pServer->label, + code, chann, sid, pHeader->meterId, taosMsg[pHeader->msgType], pHeader->sourceId, htonl(pHeader->destId), pHeader->tranId, pConn); free(data); return pConn;