diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 59f87b0a1f8d3aa192383457a85e1d53b1a3bf54..b3551fd37887767cce0e3af5de24bcbcc367195e 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -52,7 +52,7 @@ keepColumnName 1 # telemetryReporting 1 # enable/disable load balancing -# balance 1 +# balance 0 # role for dnode. 0 - any, 1 - mnode, 2 - dnode # role 0 diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index a63fb76529fe485d0f072cb6e81cce165bcf1eb6..ac98feb43eaf074f727ed0ebdc9b485b79540c90 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -161,7 +161,7 @@ bool tsdbForceCompactFile = false; // compact TSDB fileset int32_t tsdbWalFlushSize = TSDB_DEFAULT_WAL_FLUSH_SIZE; // MB // balance -int8_t tsEnableBalance = 1; +int8_t tsEnableBalance = 0; int8_t tsAlternativeRole = 0; int32_t tsBalanceInterval = 300; // seconds int32_t tsOfflineInterval = 3; diff --git a/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim b/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim index 9d0e967f4e1575195e126cd975540067038409c5..2e5293d4c5560298fb972233970c9c9172adadb7 100644 --- a/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim +++ b/tests/script/unique/arbitrator/replica_changeWithArbitrator.sim @@ -55,6 +55,11 @@ system sh/cfg.sh -n dnode2 -c statusInterval -v 3 system sh/cfg.sh -n dnode3 -c statusInterval -v 3 system sh/cfg.sh -n dnode4 -c statusInterval -v 3 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ============== step0: start tarbitrator system sh/exec_tarbitrator.sh -s start diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index f20939d458d512472cb822b44b5af0b378347017..f9a892f9463a8f391159e50a1597800d7eed805c 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -19,6 +19,12 @@ system sh/deploy.sh -n dnode5 -i 5 system sh/cfg.sh -n dnode5 -c maxVgroupsPerDb -v 4 system sh/cfg.sh -n dnode5 -c maxTablesPerVnode -v 1000 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 + print =============== prepare data system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index c98687a81ceae03d20fc205a121fcfc813c74be7..157fd8b06f303752de14f175107a8a9897a38ca0 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -44,6 +44,15 @@ system sh/cfg.sh -n dnode6 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode7 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode8 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 +system sh/cfg.sh -n dnode6 -c balance -v 1 +system sh/cfg.sh -n dnode7 -c balance -v 1 +system sh/cfg.sh -n dnode8 -c balance -v 1 + print ============== step1 print ========= start dnode1 diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 0b80acbe6c9fc11455df6023f66da7f057db2d09..a267b8c380db9af8bc817a8f5483fd503085efd7 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -44,6 +44,15 @@ system sh/cfg.sh -n dnode6 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode7 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode8 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 +system sh/cfg.sh -n dnode6 -c balance -v 1 +system sh/cfg.sh -n dnode7 -c balance -v 1 +system sh/cfg.sh -n dnode8 -c balance -v 1 + print ============== step1 print ========= start dnode1 diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index c2e9a845149cd9df78b9528115c5108c1e6531d3..71d3130ec9b727bd7d366f3d10b79dfe67748618 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -32,6 +32,14 @@ system sh/cfg.sh -n dnode5 -c wallevel -v 1 system sh/cfg.sh -n dnode6 -c wallevel -v 1 system sh/cfg.sh -n dnode7 -c wallevel -v 1 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 +system sh/cfg.sh -n dnode6 -c balance -v 1 +system sh/cfg.sh -n dnode7 -c balance -v 1 + print ============== step1 print ========= start dnode1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 5350bcc78c327ae9eb35f24e6d01901cebfb7a07..f97af083fd199a4b71421d3c2d33f3b7961e8aa2 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -19,6 +19,11 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 1 system sh/cfg.sh -n dnode3 -c balanceInterval -v 1 system sh/cfg.sh -n dnode4 -c balanceInterval -v 1 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========= start dnodes system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/balance1.sim b/tests/script/unique/dnode/balance1.sim index 8743204a03e06d0aefc66b2f70cbdc111e317237..e54d4d6c31da2c0e858eea984d8fc7e1198aac2a 100644 --- a/tests/script/unique/dnode/balance1.sim +++ b/tests/script/unique/dnode/balance1.sim @@ -30,6 +30,11 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/balance2.sim b/tests/script/unique/dnode/balance2.sim index 4c67e20c3eb5e65b0bacf0aafc3d9dc1a53d5ac3..2fd9df84b45687c0e0f3da9e4b39402033d7dd02 100644 --- a/tests/script/unique/dnode/balance2.sim +++ b/tests/script/unique/dnode/balance2.sim @@ -24,6 +24,12 @@ system sh/cfg.sh -n dnode3 -c wallevel -v 1 system sh/cfg.sh -n dnode4 -c wallevel -v 1 system sh/cfg.sh -n dnode5 -c wallevel -v 1 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/balance3.sim b/tests/script/unique/dnode/balance3.sim index f5558d504e34608eafb2a076a8739024e13dcff2..4c92ae6e22f8641fd6389db00c4625d600916000 100644 --- a/tests/script/unique/dnode/balance3.sim +++ b/tests/script/unique/dnode/balance3.sim @@ -28,6 +28,13 @@ system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode5 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode6 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 +system sh/cfg.sh -n dnode6 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/balancex.sim b/tests/script/unique/dnode/balancex.sim index d2c738ee97ff8432999125abfd63d253b0546a91..c25a395eae440662a4aa04d284fa8fcecbbc3c20 100644 --- a/tests/script/unique/dnode/balancex.sim +++ b/tests/script/unique/dnode/balancex.sim @@ -20,6 +20,11 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/m2.sim b/tests/script/unique/dnode/m2.sim index 5fdf3b740081e74024f02616483af2c943d47eb9..076ae984a6039a33f2df6b6c9288557c3f9afd28 100644 --- a/tests/script/unique/dnode/m2.sim +++ b/tests/script/unique/dnode/m2.sim @@ -24,6 +24,12 @@ system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode5 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/m3.sim b/tests/script/unique/dnode/m3.sim index 5850147d045d4e58fc8b700bcbb7d70318f0420a..fa3ff1d143dfcc7f033cbdd170fba623af109f20 100644 --- a/tests/script/unique/dnode/m3.sim +++ b/tests/script/unique/dnode/m3.sim @@ -24,6 +24,12 @@ system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode5 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 +system sh/cfg.sh -n dnode5 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/monitor_bug.sim b/tests/script/unique/dnode/monitor_bug.sim index acde8cc3c76297249c71aa0ad307502ce0283391..6eee12bbc433a9fc4f6974253e46b5613bb42a7c 100644 --- a/tests/script/unique/dnode/monitor_bug.sim +++ b/tests/script/unique/dnode/monitor_bug.sim @@ -12,6 +12,9 @@ system sh/cfg.sh -n dnode2 -c wallevel -v 1 system sh/cfg.sh -n dnode1 -c monitor -v 1 system sh/cfg.sh -n dnode2 -c monitor -v 0 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/reason.sim b/tests/script/unique/dnode/reason.sim index c685b1129d924131d38e60369d97924250b3ad66..97aaede018ef0de6aa8fb696a4295f8598c014a8 100644 --- a/tests/script/unique/dnode/reason.sim +++ b/tests/script/unique/dnode/reason.sim @@ -3,6 +3,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect @@ -91,6 +94,7 @@ endi print ========== step6 system sh/deploy.sh -n dnode4 -i 4 system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 3 +system sh/cfg.sh -n dnode4 -c balance -v 1 system sh/exec.sh -n dnode4 -s start sql create dnode $hostname4 @@ -112,6 +116,7 @@ endi print ========== step7 system sh/deploy.sh -n dnode5 -i 5 system sh/cfg.sh -n dnode5 -c statusInterval -v 3 +system sh/cfg.sh -n dnode5 -c balance -v 1 system sh/exec.sh -n dnode5 -s start sql create dnode $hostname5 @@ -154,6 +159,7 @@ endi print ========== step9 system sh/deploy.sh -n dnode7 -i 7 system sh/cfg.sh -n dnode7 -c maxTablesPerVnode -v 3000 +system sh/cfg.sh -n dnode7 -c balance -v 1 system sh/exec.sh -n dnode7 -s start sql create dnode $hostname7 @@ -175,6 +181,7 @@ endi print ========== step10 system sh/deploy.sh -n dnode8 -i 8 system sh/cfg.sh -n dnode8 -c maxVgroupsPerDb -v 3 +system sh/cfg.sh -n dnode8 -c balance -v 1 system sh/exec.sh -n dnode8 -s start sql create dnode $hostname8 diff --git a/tests/script/unique/dnode/remove1.sim b/tests/script/unique/dnode/remove1.sim index 25e0846129da4dfed1ffcafa9815d16848771ad7..fc97c163f6d58f448fd2a9d4a7b31c7b8f849bb5 100644 --- a/tests/script/unique/dnode/remove1.sim +++ b/tests/script/unique/dnode/remove1.sim @@ -20,6 +20,11 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/remove2.sim b/tests/script/unique/dnode/remove2.sim index 1d707bc4a319ce0dbc5bd66b9cff52318c25aa8d..6a9aa10c24686de8d23e2113abc97042de8deb29 100644 --- a/tests/script/unique/dnode/remove2.sim +++ b/tests/script/unique/dnode/remove2.sim @@ -20,6 +20,11 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/dnode/vnode_clean.sim b/tests/script/unique/dnode/vnode_clean.sim index 76311a6cacb2d2c06ff4125b689d3782c3e0dc98..57d22de300c5937cefd2383b510efd66bc4268a2 100644 --- a/tests/script/unique/dnode/vnode_clean.sim +++ b/tests/script/unique/dnode/vnode_clean.sim @@ -20,6 +20,11 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 +system sh/cfg.sh -n dnode3 -c balance -v 1 +system sh/cfg.sh -n dnode4 -c balance -v 1 + print ========== step1 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stable/balance_replica1.sim b/tests/script/unique/stable/balance_replica1.sim index 3ea158eb39c0d560900b34d5465fc1ef12a4b42f..589c86951ddb0ac1d1a627482479d6fc158df404 100644 --- a/tests/script/unique/stable/balance_replica1.sim +++ b/tests/script/unique/stable/balance_replica1.sim @@ -12,6 +12,9 @@ system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c balance -v 1 +system sh/cfg.sh -n dnode2 -c balance -v 1 + $dbPrefix = br1_db $tbPrefix = br1_tb $mtPrefix = br1_mt