From 23e25c0ecc0630a185911c5af07dd23c2ac74ee0 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 7 Oct 2021 16:42:23 +0800 Subject: [PATCH] code optimization --- packaging/cfg/taos.cfg | 3 +++ src/common/src/tglobal.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 310369aa14..33eca99126 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -289,3 +289,6 @@ keepColumnName 1 # percent of redundant data in tsdb meta will compact meta data,0 means donot compact # tsdbMetaCompactRatio 0 + +# unit MB. Flush vnode wal file if walSize > walFlushSize and walSize > cache*0.5*blocks +# walFlushSize 1024 diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 1b6d94440c..c2e3d426a0 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -1652,7 +1652,7 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - // flush vnode wal file if walSize >= walFlushSize and walSize >= cache*blocks*0.5 + // flush vnode wal file if walSize > walFlushSize and walSize > cache*0.5*blocks cfg.option = "walFlushSize"; cfg.ptr = &tsdbWalFlushSize; cfg.valType = TAOS_CFG_VTYPE_INT32; -- GitLab