Merge pull request #20202 from taosdata/szhou/fix/td-22788

fix: ensure capacity and move to next group
This commit is contained in:
dapan1121 2023-03-01 10:22:15 +08:00 committed by GitHub
commit 4a02c73084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 9 deletions

View File

@ -1197,16 +1197,11 @@ int32_t doCopyToSDataBlock(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock, SExprS
} }
if (pBlock->info.rows + pRow->numOfRows > pBlock->info.capacity) { if (pBlock->info.rows + pRow->numOfRows > pBlock->info.capacity) {
// expand the result datablock capacity blockDataEnsureCapacity(pBlock, pBlock->info.rows + pRow->numOfRows);
if (pRow->numOfRows > pBlock->info.capacity) { qDebug("datablock capacity not sufficient, expand to required:%d, current capacity:%d, %s",
blockDataEnsureCapacity(pBlock, pRow->numOfRows); (pRow->numOfRows+pBlock->info.rows),
qDebug("datablock capacity not sufficient, expand to requried:%d, current capacity:%d, %s", pRow->numOfRows, pBlock->info.capacity, GET_TASKID(pTaskInfo));
pBlock->info.capacity, GET_TASKID(pTaskInfo));
// todo set the pOperator->resultInfo size // todo set the pOperator->resultInfo size
} else {
releaseBufPage(pBuf, page);
break;
}
} }
pGroupResInfo->index += 1; pGroupResInfo->index += 1;