Merge pull request #19524 from taosdata/fix/long_query
fix(query): switch buffer pool recycle on
This commit is contained in:
commit
f487c4e63f
|
@ -64,8 +64,6 @@ int32_t tsdbMemTableCreate(STsdb *pTsdb, SMemTable **ppMemTable) {
|
|||
taosMemoryFree(pMemTable);
|
||||
goto _err;
|
||||
}
|
||||
// pMemTable->qList.pNext = &pMemTable->qList;
|
||||
// pMemTable->qList.ppNext = &pMemTable->qList.pNext;
|
||||
vnodeBufPoolRef(pMemTable->pPool);
|
||||
|
||||
*ppMemTable = pMemTable;
|
||||
|
@ -112,30 +110,6 @@ int32_t tsdbInsertTableData(STsdb *pTsdb, int64_t version, SSubmitTbData *pSubmi
|
|||
tb_uid_t suid = pSubmitTbData->suid;
|
||||
tb_uid_t uid = pSubmitTbData->uid;
|
||||
|
||||
#if 0
|
||||
SMetaInfo info;
|
||||
code = metaGetInfo(pTsdb->pVnode->pMeta, uid, &info, NULL);
|
||||
if (code) {
|
||||
code = TSDB_CODE_TDB_TABLE_NOT_EXIST;
|
||||
goto _err;
|
||||
}
|
||||
if (info.suid != suid) {
|
||||
code = TSDB_CODE_INVALID_MSG;
|
||||
goto _err;
|
||||
}
|
||||
if (info.suid) {
|
||||
metaGetInfo(pTsdb->pVnode->pMeta, info.suid, &info, NULL);
|
||||
}
|
||||
if (pSubmitTbData->sver != info.skmVer) {
|
||||
tsdbError("vgId:%d, req sver:%d, skmVer:%d suid:%" PRId64 " uid:%" PRId64, TD_VID(pTsdb->pVnode),
|
||||
pSubmitTbData->sver, info.skmVer, suid, uid);
|
||||
code = TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER;
|
||||
goto _err;
|
||||
}
|
||||
|
||||
if (pRsp) pRsp->sver = info.skmVer;
|
||||
#endif
|
||||
|
||||
// create/get STbData to op
|
||||
code = tsdbGetOrCreateTbData(pMemTable, suid, uid, &pTbData);
|
||||
if (code) {
|
||||
|
@ -812,29 +786,3 @@ SArray *tsdbMemTableGetTbDataArray(SMemTable *pMemTable) {
|
|||
_exit:
|
||||
return aTbDataP;
|
||||
}
|
||||
|
||||
// int32_t tsdbRecycleMemTable(SMemTable *pMemTable) {
|
||||
// int32_t code = 0;
|
||||
|
||||
// SQueryNode *pNode = pMemTable->qList.pNext;
|
||||
// while (1) {
|
||||
// ASSERT(pNode != &pMemTable->qList);
|
||||
// SQueryNode *pNextNode = pNode->pNext;
|
||||
|
||||
// if (pNextNode == &pMemTable->qList) {
|
||||
// code = (*pNode->reseek)(pNode->pQHandle);
|
||||
// if (code) goto _exit;
|
||||
// break;
|
||||
// } else {
|
||||
// code = (*pNode->reseek)(pNode->pQHandle);
|
||||
// if (code) goto _exit;
|
||||
// pNode = pMemTable->qList.pNext;
|
||||
// ASSERT(pNode == pNextNode);
|
||||
// }
|
||||
// }
|
||||
|
||||
// // NOTE: Take care here, pMemTable is destroyed
|
||||
|
||||
// _exit:
|
||||
// return code;
|
||||
// }
|
||||
|
|
|
@ -252,8 +252,6 @@ void vnodeBufPoolUnRef(SVBufPool *pPool, bool proactive) {
|
|||
if (pVnode->onRecycle == pPool) {
|
||||
pVnode->onRecycle = NULL;
|
||||
} else {
|
||||
ASSERT(proactive);
|
||||
|
||||
if (pPool->recyclePrev) {
|
||||
pPool->recyclePrev->recycleNext = pPool->recycleNext;
|
||||
} else {
|
||||
|
|
|
@ -75,10 +75,10 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
|
|||
break;
|
||||
} else {
|
||||
vDebug("vgId:%d no free buffer pool on %d try, try to recycle...", TD_VID(pVnode), nTry);
|
||||
/*
|
||||
|
||||
code = vnodeTryRecycleBufPool(pVnode);
|
||||
TSDB_CHECK_CODE(code, lino, _exit);
|
||||
*/
|
||||
|
||||
if (pVnode->freeList == NULL) {
|
||||
vDebug("vgId:%d no free buffer pool on %d try, wait %d ms...", TD_VID(pVnode), nTry, WAIT_TIME_MILI_SEC);
|
||||
|
||||
|
|
|
@ -671,7 +671,6 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
|
|||
goto end;
|
||||
}
|
||||
|
||||
colLength[c] = htonl(colLength[c]);
|
||||
int8_t* offset = pStart;
|
||||
if (IS_VAR_DATA_TYPE(pColSchema->type)) {
|
||||
pStart += numOfRows * sizeof(int32_t);
|
||||
|
|
Loading…
Reference in New Issue