From 258181e387794589a639a6408e35b66598ad5a8e Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 9 Oct 2023 16:03:42 +0800 Subject: [PATCH] change block commit factor --- source/dnode/vnode/src/tsdb/tsdbFS2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index e16eee39e8..afc9b7db3a 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -18,6 +18,8 @@ #include "vnd.h" #include "vndCos.h" +#define BLOCK_COMMIT_FACTOR 3 + extern int vnodeScheduleTask(int (*execute)(void *), void *arg); extern int vnodeScheduleTaskEx(int tpid, int (*execute)(void *), void *arg); extern void remove_file(const char *fname); @@ -882,7 +884,7 @@ int32_t tsdbFSEditCommit(STFileSystem *fs) { schedMerge = true; } - if (numFile >= sttTrigger * 2) { + if (numFile >= sttTrigger * BLOCK_COMMIT_FACTOR) { blockCommit = true; } @@ -1148,4 +1150,4 @@ int32_t tsdbFSEnableBgTask(STFileSystem *fs) { fs->stop = false; taosThreadMutexUnlock(fs->mutex); return 0; -} +} \ No newline at end of file