From 7e63eb0d458f695466558c876b07f1b58f7635f5 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 6 Aug 2020 15:33:01 +0800 Subject: [PATCH] fix log database coredump bug --- src/inc/taosdef.h | 2 +- src/plugins/monitor/src/monitorMain.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index c3a808b765..dcbf96b495 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -292,7 +292,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size); #define TSDB_MAX_CACHE_BLOCK_SIZE 128 // 128MB for each vnode #define TSDB_DEFAULT_CACHE_BLOCK_SIZE 16 -#define TSDB_MIN_TOTAL_BLOCKS 2 +#define TSDB_MIN_TOTAL_BLOCKS 3 #define TSDB_MAX_TOTAL_BLOCKS 10000 #define TSDB_DEFAULT_TOTAL_BLOCKS 6 diff --git a/src/plugins/monitor/src/monitorMain.c b/src/plugins/monitor/src/monitorMain.c index b31fc368af..8bf9277a43 100644 --- a/src/plugins/monitor/src/monitorMain.c +++ b/src/plugins/monitor/src/monitorMain.c @@ -149,9 +149,9 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { if (cmd == MONITOR_CMD_CREATE_DB) { snprintf(sql, SQL_LENGTH, - "create database if not exists %s replica 1 days 10 keep 30 cache 1 " - "blocks 2 maxtables 16 precision 'us'", - tsMonitorDbName); + "create database if not exists %s replica 1 days 10 keep 30 cache %d " + "blocks %d maxtables 16 precision 'us'", + tsMonitorDbName, TSDB_MIN_CACHE_BLOCK_SIZE, TSDB_MIN_TOTAL_BLOCKS); } else if (cmd == MONITOR_CMD_CREATE_MT_DN) { snprintf(sql, SQL_LENGTH, "create table if not exists %s.dn(ts timestamp" -- GitLab