提交 12f28a4a 编写于 作者: B Benguang Zhao

enh: unify error msg for no disk space

上级 f22d279f
...@@ -871,9 +871,9 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition ...@@ -871,9 +871,9 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition
getBufferPgSize(pInfo->binfo.pRes->info.rowSize, &defaultPgsz, &defaultBufsz); getBufferPgSize(pInfo->binfo.pRes->info.rowSize, &defaultPgsz, &defaultBufsz);
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
pTaskInfo->code = terrno; 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; goto _error;
} }
......
...@@ -2911,8 +2911,8 @@ int32_t initStreamAggSupporter(SStreamAggSupporter* pSup, SqlFunctionCtx* pCtx, ...@@ -2911,8 +2911,8 @@ int32_t initStreamAggSupporter(SStreamAggSupporter* pSup, SqlFunctionCtx* pCtx,
bufSize = pageSize * 4; bufSize = pageSize * 4;
} }
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
qError("Init stream agg supporter failed since %s", terrstr(terrno)); qError("Init stream agg supporter failed since %s, tempDir:%s", terrstr(), tsTempDir);
return terrno; return terrno;
} }
int32_t code = createDiskbasedBuf(&pSup->pResultBuf, pageSize, bufSize, "function", tsTempDir); 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_ ...@@ -248,8 +248,8 @@ SLHashObj* tHashInit(int32_t inMemPages, int32_t pageSize, _hash_fn_t fn, int32_
} }
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
printf("tHash Init failed since %s", terrstr(terrno)); printf("tHash Init failed since %s, tempDir:%s", terrstr(), tsTempDir);
taosMemoryFree(pHashObj); taosMemoryFree(pHashObj);
return NULL; return NULL;
} }
......
...@@ -195,8 +195,8 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) { ...@@ -195,8 +195,8 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) {
if (pHandle->pBuf == NULL) { if (pHandle->pBuf == NULL) {
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
qError("Add to buf failed since %s", terrstr(terrno)); qError("Add to buf failed since %s, tempDir:%s", terrstr(), tsTempDir);
return terrno; return terrno;
} }
...@@ -261,9 +261,8 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32 ...@@ -261,9 +261,8 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
// multi-pass internal merge sort is required // multi-pass internal merge sort is required
if (pHandle->pBuf == NULL) { if (pHandle->pBuf == NULL) {
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
code = TSDB_CODE_NO_AVAIL_DISK; code = terrno = TSDB_CODE_NO_DISKSPACE;
terrno = code; qError("Sort compare init failed since %s, tempDir:%s, idStr:%s", terrstr(), tsTempDir, pHandle->idStr);
qError("Sort compare init failed since %s, %s", tstrerror(code), pHandle->idStr);
return code; return code;
} }
......
...@@ -855,7 +855,9 @@ int32_t setSelectivityValue(SqlFunctionCtx* pCtx, SSDataBlock* pBlock, const STu ...@@ -855,7 +855,9 @@ int32_t setSelectivityValue(SqlFunctionCtx* pCtx, SSDataBlock* pBlock, const STu
int32_t numOfCols = pCtx->subsidiaries.num; int32_t numOfCols = pCtx->subsidiaries.num;
const char* p = loadTupleData(pCtx, pTuplePos); const char* p = loadTupleData(pCtx, pTuplePos);
if (p == NULL) { 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; return terrno;
} }
...@@ -5098,7 +5100,9 @@ int32_t modeFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { ...@@ -5098,7 +5100,9 @@ int32_t modeFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
if (maxCount != 0) { if (maxCount != 0) {
const char* pData = loadTupleData(pCtx, &resDataPos); const char* pData = loadTupleData(pCtx, &resDataPos);
if (pData == NULL) { 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); modeFunctionCleanup(pInfo);
return code; return code;
} }
......
...@@ -277,7 +277,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval, ...@@ -277,7 +277,7 @@ tMemBucket *tMemBucketCreate(int16_t nElemSize, int16_t dataType, double minval,
resetSlotInfo(pBucket); resetSlotInfo(pBucket);
if (!osTempSpaceAvailable()) { if (!osTempSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
// qError("MemBucket create disk based Buf failed since %s", terrstr(terrno)); // qError("MemBucket create disk based Buf failed since %s", terrstr(terrno));
tMemBucketDestroy(pBucket); tMemBucketDestroy(pBucket);
return NULL; return NULL;
......
...@@ -844,7 +844,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) { ...@@ -844,7 +844,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) {
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) { int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
if (!osDataSpaceAvailable()) { if (!osDataSpaceAvailable()) {
terrno = TSDB_CODE_NO_AVAIL_DISK; terrno = TSDB_CODE_NO_DISKSPACE;
fnError("udfd create shared library failed since %s", terrstr(terrno)); fnError("udfd create shared library failed since %s", terrstr(terrno));
return terrno; return terrno;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册