fix: fix tsort crash caused by not enough disk space
This commit is contained in:
parent
c1fa979f17
commit
9f3af66ae0
|
@ -995,7 +995,12 @@ static int32_t createBlocksMergeSortInitialSources(SSortHandle* pHandle) {
|
|||
SArray* aExtSrc = taosArrayInit(nSrc, POINTER_BYTES);
|
||||
|
||||
size_t maxBufSize = pHandle->numOfPages * pHandle->pageSize;
|
||||
createPageBuf(pHandle);
|
||||
|
||||
int32_t code = createPageBuf(pHandle);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
taosArrayDestroy(aExtSrc);
|
||||
return code;
|
||||
}
|
||||
|
||||
SSortSource* pSrc = taosArrayGetP(pHandle->pOrderedSource, 0);
|
||||
int32_t szSort = 0;
|
||||
|
@ -1070,7 +1075,7 @@ static int32_t createBlocksMergeSortInitialSources(SSortHandle* pHandle) {
|
|||
taosArrayDestroy(aExtSrc);
|
||||
|
||||
pHandle->type = SORT_SINGLESOURCE_SORT;
|
||||
return 0;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
static int32_t createBlocksQuickSortInitialSources(SSortHandle* pHandle) {
|
||||
|
|
Loading…
Reference in New Issue