reduce to 30s for long query
This commit is contained in:
parent
ca43acde1e
commit
27f9f9e435
|
@ -240,7 +240,7 @@ int waitMoment(SQInfo* pQInfo){
|
|||
}
|
||||
}
|
||||
if(ms == 0) return 0;
|
||||
qWarn("wait sleep %dms. sql=%s", ms, pQInfo->sql);
|
||||
printf("test wait sleep %dms. sql=%s ...\n", ms, pQInfo->sql);
|
||||
|
||||
if(ms < 1000) {
|
||||
taosMsleep(ms);
|
||||
|
@ -250,7 +250,7 @@ int waitMoment(SQInfo* pQInfo){
|
|||
taosMsleep(1000);
|
||||
used_ms += 1000;
|
||||
if(isQueryKilled(pQInfo)){
|
||||
qWarn("check query is canceled, sleep break... %s", pQInfo->sql);
|
||||
printf("test check query is canceled, sleep break.%s\n", pQInfo->sql);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -753,9 +753,16 @@ bool qFixedNoBlock(void* pRepo, void* pMgmt, int32_t longQueryMs) {
|
|||
|
||||
//solve tsdb no block to commit
|
||||
bool qSolveCommitNoBlock(void* pRepo, void* pMgmt) {
|
||||
qWarn("pRepo=%p start solve no block problem.", pRepo);
|
||||
qWarn("pRepo=%p start solve problem.", pRepo);
|
||||
if(qFixedNoBlock(pRepo, pMgmt, 10*60*1000)) {
|
||||
return true;
|
||||
}
|
||||
return qFixedNoBlock(pRepo, pMgmt, 2*60*1000);
|
||||
if(qFixedNoBlock(pRepo, pMgmt, 2*60*1000)){
|
||||
return true;
|
||||
}
|
||||
if(qFixedNoBlock(pRepo, pMgmt, 30*1000)){
|
||||
return true;
|
||||
}
|
||||
qWarn("pRepo=%p solve problem failed.", pRepo);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ SListNode *tsdbAllocBufBlockFromPool(STsdbRepo *pRepo) {
|
|||
if(tsDeadLockKillQuery) {
|
||||
// supply new Block
|
||||
if(tsdbInsertNewBlock(pRepo) > 0) {
|
||||
tsdbWarn("vgId:%d add new elastic block . elasticBlocks=%d totalBlocks=%d", REPO_ID(pRepo), pBufPool->nElasticBlocks, pBufPool->nBufBlocks);
|
||||
tsdbWarn("vgId:%d add new elastic block . elasticBlocks=%d cur free Blocks=%d", REPO_ID(pRepo), pBufPool->nElasticBlocks, pBufPool->bufBlockList->numOfEles);
|
||||
break;
|
||||
} else {
|
||||
// no newBlock, kill query free
|
||||
|
@ -205,7 +205,10 @@ void tsdbRecycleBufferBlock(STsdbBufPool* pPool, SListNode *pNode, bool bELastic
|
|||
tsdbFreeBufBlock(pBufBlock);
|
||||
free(pNode);
|
||||
if(bELastic)
|
||||
{
|
||||
pPool->nElasticBlocks--;
|
||||
tsdbWarn("pPool=%p elastic block reduce one . nElasticBlocks=%d cur free Blocks=%d", pPool, pPool->nElasticBlocks, pPool->bufBlockList->numOfEles);
|
||||
}
|
||||
else
|
||||
pPool->nBufBlocks--;
|
||||
}
|
|
@ -106,7 +106,7 @@ int tsdbUnRefMemTable(STsdbRepo *pRepo, SMemTable *pMemTable) {
|
|||
tsdbRecycleBufferBlock(pBufPool, pNode, false);
|
||||
pBufPool->nRecycleBlocks -= 1;
|
||||
} else {
|
||||
if(pBufPool->nElasticBlocks > 0 && listNEles(pBufPool->bufBlockList) > 0) {
|
||||
if(pBufPool->nElasticBlocks > 0 && listNEles(pBufPool->bufBlockList) > 2) {
|
||||
tsdbRecycleBufferBlock(pBufPool, pNode, true);
|
||||
} else {
|
||||
tdListAppendNode(pBufPool->bufBlockList, pNode);
|
||||
|
|
Loading…
Reference in New Issue