提交 a55df5e9 编写于 作者: A AlexDuan

fixed deadlock missspelling and printf replace with log api

上级 3a1773f5
......@@ -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];
......
......@@ -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;
......
......@@ -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;
}
}
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册