提交 592899c9 编写于 作者: H hjxilinx

[td-186] add more log

上级 03675a7a
......@@ -419,13 +419,11 @@ int tscProcessSql(SSqlObj *pSql) {
type = pQueryInfo->type;
// while numOfTables equals to 0, it must be Heartbeat
assert((pQueryInfo->numOfTables == 0 && pQueryInfo->command == TSDB_SQL_HB) ||
pQueryInfo->numOfTables > 0);
assert((pQueryInfo->numOfTables == 0 && pQueryInfo->command == TSDB_SQL_HB) || pQueryInfo->numOfTables > 0);
}
tscTrace("%p SQL cmd:%d will be processed, name:%s, type:%d", pSql, pCmd->command, name, type);
if (pSql->cmd.command < TSDB_SQL_MGMT) {
// the pTableMetaInfo cannot be NULL
if (pSql->cmd.command < TSDB_SQL_MGMT) { // the pTableMetaInfo cannot be NULL
if (pTableMetaInfo == NULL) {
pSql->res.code = TSDB_CODE_OTHERS;
return pSql->res.code;
......
......@@ -103,7 +103,7 @@ int32_t getNumOfResultBufGroupId(SDiskbasedResultBuf* pResultBuf);
* destroy result buffer
* @param pResultBuf
*/
void destroyResultBuf(SDiskbasedResultBuf* pResultBuf);
void destroyResultBuf(SDiskbasedResultBuf* pResultBuf, void* handle);
/**
*
......
......@@ -191,7 +191,7 @@ SIDList getDataBufPagesIdList(SDiskbasedResultBuf* pResultBuf, int32_t groupId)
}
}
void destroyResultBuf(SDiskbasedResultBuf* pResultBuf) {
void destroyResultBuf(SDiskbasedResultBuf* pResultBuf, void* handle) {
if (pResultBuf == NULL) {
return;
}
......@@ -200,7 +200,7 @@ void destroyResultBuf(SDiskbasedResultBuf* pResultBuf) {
close(pResultBuf->fd);
}
qTrace("disk-based output buffer closed, %" PRId64 " bytes, file:%s", pResultBuf->totalBufSize, pResultBuf->path);
qTrace("QInfo:%p disk-based output buffer closed, %" PRId64 " bytes, file:%s", handle, pResultBuf->totalBufSize, pResultBuf->path);
munmap(pResultBuf->pBuf, pResultBuf->totalBufSize);
unlink(pResultBuf->path);
......
......@@ -1500,8 +1500,9 @@ static void teardownQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv) {
}
SQuery *pQuery = pRuntimeEnv->pQuery;
qTrace("QInfo:%p teardown runtime env", GET_QINFO_ADDR(pRuntimeEnv));
SQInfo* pQInfo = (SQInfo*) GET_QINFO_ADDR(pRuntimeEnv);
qTrace("QInfo:%p teardown runtime env", pQInfo);
cleanupTimeWindowInfo(&pRuntimeEnv->windowResInfo, pQuery->numOfOutput);
if (pRuntimeEnv->pCtx != NULL) {
......@@ -1531,7 +1532,7 @@ static void teardownQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv) {
tfree(pRuntimeEnv->pInterpoBuf);
}
destroyResultBuf(pRuntimeEnv->pResultBuf);
destroyResultBuf(pRuntimeEnv->pResultBuf, pQInfo);
tsdbCleanupQueryHandle(pRuntimeEnv->pQueryHandle);
tsdbCleanupQueryHandle(pRuntimeEnv->pSecQueryHandle);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册