Merge pull request #21072 from taosdata/FIX/TD-22103-3.0
enh: unify error msg for no disk space
This commit is contained in:
commit
528d55f8f9
|
@ -871,9 +871,9 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition
|
|||
getBufferPgSize(pInfo->binfo.pRes->info.rowSize, &defaultPgsz, &defaultBufsz);
|
||||
|
||||
if (!osTempSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
pTaskInfo->code = terrno;
|
||||
qError("Create partition operator info failed since %s", terrstr(terrno));
|
||||
qError("Create partition operator info failed since %s, tempDir:%s", terrstr(), tsTempDir);
|
||||
goto _error;
|
||||
}
|
||||
|
||||
|
|
|
@ -2911,8 +2911,8 @@ int32_t initStreamAggSupporter(SStreamAggSupporter* pSup, SqlFunctionCtx* pCtx,
|
|||
bufSize = pageSize * 4;
|
||||
}
|
||||
if (!osTempSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
qError("Init stream agg supporter failed since %s", terrstr(terrno));
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
qError("Init stream agg supporter failed since %s, tempDir:%s", terrstr(), tsTempDir);
|
||||
return terrno;
|
||||
}
|
||||
int32_t code = createDiskbasedBuf(&pSup->pResultBuf, pageSize, bufSize, "function", tsTempDir);
|
||||
|
|
|
@ -248,8 +248,8 @@ SLHashObj* tHashInit(int32_t inMemPages, int32_t pageSize, _hash_fn_t fn, int32_
|
|||
}
|
||||
|
||||
if (!osTempSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
printf("tHash Init failed since %s", terrstr(terrno));
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
printf("tHash Init failed since %s, tempDir:%s", terrstr(), tsTempDir);
|
||||
taosMemoryFree(pHashObj);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -195,8 +195,8 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) {
|
|||
|
||||
if (pHandle->pBuf == NULL) {
|
||||
if (!osTempSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
qError("Add to buf failed since %s", terrstr(terrno));
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
qError("Add to buf failed since %s, tempDir:%s", terrstr(), tsTempDir);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
|
@ -261,9 +261,8 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
|
|||
// multi-pass internal merge sort is required
|
||||
if (pHandle->pBuf == NULL) {
|
||||
if (!osTempSpaceAvailable()) {
|
||||
code = TSDB_CODE_NO_AVAIL_DISK;
|
||||
terrno = code;
|
||||
qError("Sort compare init failed since %s, %s", tstrerror(code), pHandle->idStr);
|
||||
code = terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
qError("Sort compare init failed since %s, tempDir:%s, idStr:%s", terrstr(), tsTempDir, pHandle->idStr);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
@ -855,7 +855,9 @@ int32_t setSelectivityValue(SqlFunctionCtx* pCtx, SSDataBlock* pBlock, const STu
|
|||
int32_t numOfCols = pCtx->subsidiaries.num;
|
||||
const char* p = loadTupleData(pCtx, pTuplePos);
|
||||
if (p == NULL) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
terrno = TSDB_CODE_NOT_FOUND;
|
||||
qError("Load tuple data failed since %s, groupId:%" PRIu64 ", ts:%" PRId64, terrstr(),
|
||||
pTuplePos->streamTupleKey.groupId, pTuplePos->streamTupleKey.ts);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
|
@ -5098,7 +5100,9 @@ int32_t modeFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
if (maxCount != 0) {
|
||||
const char* pData = loadTupleData(pCtx, &resDataPos);
|
||||
if (pData == NULL) {
|
||||
code = TSDB_CODE_NO_AVAIL_DISK;
|
||||
code = terrno = TSDB_CODE_NOT_FOUND;
|
||||
qError("Load tuple data failed since %s, groupId:%" PRIu64 ", ts:%" PRId64, terrstr(),
|
||||
resDataPos.streamTupleKey.groupId, resDataPos.streamTupleKey.ts);
|
||||
modeFunctionCleanup(pInfo);
|
||||
return code;
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval,
|
|||
resetSlotInfo(pBucket);
|
||||
|
||||
if (!osTempSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
// qError("MemBucket create disk based Buf failed since %s", terrstr(terrno));
|
||||
tMemBucketDestroy(pBucket);
|
||||
return NULL;
|
||||
|
|
|
@ -844,7 +844,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) {
|
|||
|
||||
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
|
||||
if (!osDataSpaceAvailable()) {
|
||||
terrno = TSDB_CODE_NO_AVAIL_DISK;
|
||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||
fnError("udfd create shared library failed since %s", terrstr(terrno));
|
||||
return terrno;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue