fixed deadlock missspelling and printf replace with log api

This commit is contained in:
AlexDuan 2021-08-24 18:14:14 +08:00
parent 3a1773f565
commit a55df5e927
4 changed files with 8 additions and 8 deletions

View File

@ -222,7 +222,7 @@ extern uint32_t curRange;
extern char Compressor[];
#endif
// long query
extern int8_t tsDeathLockKillQuery;
extern int8_t tsDeadLockKillQuery;
typedef struct {
char dir[TSDB_FILENAME_LEN];

View File

@ -277,7 +277,7 @@ char Compressor[32] = "ZSTD_COMPRESSOR"; // ZSTD_COMPRESSOR or GZIP_COMPRESS
#endif
// long query death-lock
int8_t tsDeathLockKillQuery = 0;
int8_t tsDeadLockKillQuery = 0;
int32_t (*monStartSystemFp)() = NULL;
void (*monStopSystemFp)() = NULL;
@ -1651,8 +1651,8 @@ static void doInitGlobalConfig(void) {
#endif
// enable kill long query
cfg.option = "deathLockKillQuery";
cfg.ptr = &tsDeathLockKillQuery;
cfg.option = "deadLockKillQuery";
cfg.ptr = &tsDeadLockKillQuery;
cfg.valType = TAOS_CFG_VTYPE_INT8;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
cfg.minValue = 0;

View File

@ -239,8 +239,8 @@ int waitMoment(SQInfo* pQInfo){
ms *= 1000;
}
}
printf("wait sleep %dms. sql=%s\n", ms, pQInfo->sql);
if(ms == 0) return 0;
qWarn("wait sleep %dms. sql=%s", ms, pQInfo->sql);
if(ms < 1000) {
taosMsleep(ms);
@ -250,7 +250,7 @@ int waitMoment(SQInfo* pQInfo){
taosMsleep(1000);
used_ms += 1000;
if(isQueryKilled(pQInfo)){
printf(" check query is canceled, sleep break... %s\n", pQInfo->sql);
qWarn("check query is canceled, sleep break... %s", pQInfo->sql);
break;
}
}

View File

@ -118,7 +118,7 @@ SListNode *tsdbAllocBufBlockFromPool(STsdbRepo *pRepo) {
STsdbBufPool *pBufPool = pRepo->pPool;
while (POOL_IS_EMPTY(pBufPool)) {
if(tsDeathLockKillQuery) {
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);