diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index c3a808b7659b5be4f6de381359b731f5e816cfb0..dcbf96b495ddb7de2973bfdc83e67b52b03436be 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 b31fc368affa8643993895d5860c59416bf1949d..8bf9277a43da1c2e5b21c309479ceeb8f5220be0 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"