diff --git a/src/balance/src/balance.c b/src/balance/src/balance.c index db5dd6a520bec182c132da8132140b7cc9b08b39..53ed860aa16e7733e656c965feb75f88d0d26311 100644 --- a/src/balance/src/balance.c +++ b/src/balance/src/balance.c @@ -415,7 +415,11 @@ static int32_t balanceMonitorVgroups() { } else if (vgReplica < dbReplica) { mInfo("vgId:%d, replica:%d numOfVnodes:%d, try add one vnode", pVgroup->vgId, dbReplica, vgReplica); hasUpdatingVgroup = true; - balanceAddVnode(pVgroup, NULL, NULL); + int32_t code = balanceAddVnode(pVgroup, NULL, NULL); + if (code == TSDB_CODE_SUCCESS) { + mnodeDecVgroupRef(pVgroup); + break; + } } mnodeDecVgroupRef(pVgroup); diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index c3a808b7659b5be4f6de381359b731f5e816cfb0..e27ac7f5d3ae644c36610be52fac964f36ca5dcf 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -303,7 +303,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size); #define TSDB_MIN_DAYS_PER_FILE 1 #define TSDB_MAX_DAYS_PER_FILE 3650 -#define TSDB_DEFAULT_DAYS_PER_FILE 10 +#define TSDB_DEFAULT_DAYS_PER_FILE 2 #define TSDB_MIN_KEEP 1 // data in db to be reserved. #define TSDB_MAX_KEEP 365000 // data in db to be reserved. diff --git a/src/sync/src/syncMain.c b/src/sync/src/syncMain.c index 2cc026484b9c107a7031a5e3d57215b1a02702b1..7c4b57350af0e66ce1a0bf7c63987a2b6db274bb 100644 --- a/src/sync/src/syncMain.c +++ b/src/sync/src/syncMain.c @@ -30,7 +30,7 @@ #include "syncInt.h" // global configurable -int tsMaxSyncNum = 4; +int tsMaxSyncNum = 2; int tsSyncTcpThreads = 2; int tsMaxWatchFiles = 100; int tsMaxFwdInfo = 200;