05-Sync¶
¶
Scale-up: repica-1 (mnode)
1. Create a 1-dnode cluster
2. Create database d1 (1 vgroup, replica 1) and insert data
3. Start dnode2, join it to the cluster, run BALANCE VGROUP; verify vnode distribution and data integrity
4. Create database d2 (1 vgroup, replica 1) and insert data; check distribution & integrity
5. Remove dnode2; verify vnode distribution and data integrity
6. Start dnode3, join it to the cluster, run BALANCE VGROUP; verify distribution & integrity
7. Create database d3 (1 vgroup, replica 1) and insert data; check distribution & integrity
8. Remove dnode3; verify vnode distribution and data integrity
9. Create database d4 (1 vgroup, replica 1) and insert data; check distribution & integrity
¶
Scale-up: repica-3 db-1
1. Create a 3-dnode cluster
2. Create four 1-vgroup, 3-replica databases and insert data; verify vnode distribution and data integrity
3. Start dnode4 and dnode5, then add them to the cluster
4. Drop dnode2; verify vnode re-distribution and data integrity
5. Drop dnode3; verify vnode re-distribution and data integrity
¶
Scale-up: repica-1 db-2
1. Start a 4-dnode cluster
2. Create two 1-vgroup, 3-replica databases d1 and d2; insert data and verify vnode distribution & data integrity
3. Remove dnode2; verify vnode re-distribution & data integrity
4. Start dnode5 and join it to the cluster; run BALANCE VGROUP; verify distribution & integrity
5. Create one more 1-vgroup, 3-replica database d3; insert data and verify
6. Start dnode6 and join the cluster; run BALANCE VGROUP; verify distribution & integrity
7. Remove dnode3; verify final vnode distribution & data integrity
¶
balance leader with replica 2
1. Verify that balance vgroup leader works correctly for replica-2 databases.
Previously this failed with "No VGroup's leader need to be balanced" because
the election baseline loop hardcoded i < 3 instead of i < replica, causing
an invalid dnode-0 lookup for the non-existent third vnodeGid slot.
¶
Balance: replica-1
1. Create a single-replica database with 2 vgroups and insert data
2. Start a new dnode and add it to the cluster
3. Execute BALANCE VGROUP
4. Verify vnode distribution and data integrity
¶
Balance: replica-3
1. Create a 3-replica database with 4 vgroups and insert data
2. Start a new dnode and add it to the cluster
3. Execute BALANCE VGROUP
4. Verify vnode distribution and data integrity
¶
Scale-up: repica-1
1. Start a 1-node cluster
2. Create database d1 (1 vgroup, 1 replica); create table, insert data, verify
3. Add dnode2 → run BALANCE VGROUP
4. Create database d2 (1 vgroup, 1 replica); create table, insert data, verify
5. Remove dnode2
6. Add dnode3 → run BALANCE VGROUP
7. Create database d3 (1 vgroup, 1 replica); create table, insert data, verify
8. Add dnode4 → run BALANCE VGROUP
9. Create database d4 (4 vgroups, 1 replica); create tables, insert data, verify
10. Remove dnode3
11. Check data integrity for all databases d1, d2, d3, and d4
¶
Scale-up: repica mixed
1. Start a 1-dnode cluster
2. Create databases d1 and d2 (each 1 vgroup, replica 1) and insert data
3. Start dnode2 and dnode3, add them to the cluster
4. Create database d3 (3 vgroups, replica 3) and insert data; verify vnode distribution & data integrity
5. Start dnode4 and join the cluster; run BALANCE VGROUP; verify distribution & integrity
6. Drop dnode2; verify vnode re-distribution & data integrity
¶
RDST: replica-1
1. Start a 2-dnode cluster with supportVnodes=0 on dnode1
2. Create database d1 (1 vgroup, replica 1) and insert data
3. Add dnode3 and dnode4 to the cluster
4. Execute REDISTRIBUTE VGROUP to move the vnode to dnode3; verify distribution & data integrity
5. Execute REDISTRIBUTE VGROUP to move the vnode to dnode4; verify
6. Execute REDISTRIBUTE VGROUP to move the vnode to dnode2; verify
7. Repeat steps 4-6 three more times, cycling the vnode among dnode3 → dnode4 → dnode2 → dnode3 → dnode2 → dnode3 → dnode2, verifying distribution & data integrity after each move
¶
RDST: replica-2
1. Start a 3-dnode cluster with supportVnodes=0 on dnode1
2. Create database d1 (1 vgroup, replica 2) and insert data
3. Add dnode3 and dnode4 to the cluster
4. Execute REDISTRIBUTE VGROUP to move the vnode to dnode4 dnode5; verify distribution & data integrity
5. Execute REDISTRIBUTE VGROUP to move the vnode to dnode2 dnode3; verify distribution & data integrity
¶
RDST: repica-3 follower
1. Start a 4-node cluster with dnode1 configured as supportVnodes=0
2. Create database d1 (1 vgroup, 3 replicas) and insert data
3. Execute illegal REDISTRIBUTE VGROUP commands (expected to fail because no eligible dnodes are available)
4. Add dnode5 to the cluster
5. Identify the vnode whose role is leader; keep this leader fixed
6. For the two follower vnodes, perform five round-trip moves among the remaining three dnodes. After each move, verify vnode distribution and data integrity
¶
RDST: replica-3 leader
1. Start a 4-node cluster with dnode1 configured as supportVnodes=0
2. Create database d1 (1 vgroup, 3 replicas) and write data
3. Execute illegal REDISTRIBUTE VGROUP commands (expected to fail due to insufficient eligible dnodes)
4. Add dnode5 to the cluster
5. Identify the follower vnode and keep it unchanged
6. Move the leader vnode among the remaining three dnodes five times; after each move, check vnode distribution and data integrity
¶
RDST: replica-3 move-2
1. Start a 4-node cluster with dnode1 set to supportVnodes=0
2. Create database d1 (1 vgroup, 3 replicas) and write data
3. Add dnode5 and dnode6 to the cluster
4. In parallel, move two vnodes to the new nodes
5. After each move, verify vnode distribution and data integrity
6. Repeat steps 4-5 three times
¶
RDST: replica-3 move-3
1. Start a 4-node cluster with dnode1 set to supportVnodes=0
2. Create database d1 (1 vgroup, 3 replicas) and write data
3. Add dnode5 and dnode6 to the cluster
4. In parallel, move three vnodes to the new nodes
5. After each move, verify vnode distribution and data integrity
6. Repeat steps 4-5 three times
¶
Cluster split vgroup
1. Generate at least two stt files of the same fileset for db2 and db1
2. Check db1 and db2 same after creating
3. Split vgroup on db2
4. Insert the same data per tables into splited vgroups
5. Check two db query result same
6. Check split vgroup on empty database
7. Check split vgroup forbidden when having topic and stream
8. Compact database and check query result same
¶
Split: replica-1
1. Start a 2-node cluster with dnode1 configured as supportVnodes=0
2. Create database d1 (1 vgroup, 1 replica) and insert data
3. Add a new dnode2 to the cluster
4. Run SPLIT VGROUP to split the vnode; verify the new vnode distribution and data integrity
¶
Split: replica-2
1. Start a 4-node cluster with dnode1 configured as supportVnodes=0
2. Create database d1 (1 vgroup, 2 replicas) and insert data
3. Execute SPLIT VGROUP to split the vnode
¶
Split: replica-3
1. Start a 4-node cluster with dnode1 configured as supportVnodes=0
2. Create database d1 (1 vgroup, 3 replicas) and insert data
3. Execute SPLIT VGROUP to split the vnode
¶
Query: after balance
1. Launch a single-node cluster
2. Create a 1-replica database with 4 vgroups
3. Create one super table and 13 child tables; insert 200 rows into each
4. Add dnode2 to the cluster
5. Execute BALANCE VGROUP
6. Verify data integrity in all tables
¶
Query: after restart
1. Start a 2-node cluster
2. Create a 1-replica database with 3 vgroups
3. Create one super table and 10 child tables; insert 20 rows into each
4. Stop dnode2 → expect queries to fail
5. Restart dnode2 → queries succeed and all data are present
¶
Query: repica-3
1. Start a 6-node cluster
2. Create a 3-replica database with 3 vgroups
3. Create one super table and 10 child tables; insert 20 rows into each
4. Run COUNT and INTERVAL queries; verify the results
¶
Query: replica-3 restart
1. Start a 4-node cluster with dnode1 set to supportVnodes=0
2. Create a 3-replica database with 1 vgroup
3. Create one super table and 10 child tables; insert 20 rows into each
4. Restart each dnode multiple times
5. Verify data integrity
¶
Query: replica-3 rsma
1. Start a 4-node cluster with dnode1 supportVnodes=0
2. Create a 3-replica database with 1 vgroup
3. Create one RSMA-enabled super table and one child table
4. Stop dnode4
5. Insert data and flush database
6. Repeat steps 4-5 twice
7. Restart all dnodes
8. Query and verify results
¶
Write: replica-3 mnode-3
1. Start a 3-node cluster with 3 mnodes.
2. Create a 1-replica, 1-vgroup database; create table, insert data, and verify.
3. Stop dnode2 → insert data → start dnode2 → insert data.
4. Stop dnode3 → insert data → start dnode3 → insert data.
5. Stop dnode1 → insert data → start dnode1 → insert data.
6. Verify data integrity across all nodes.
¶
Write: replica-3 import data
1. Start a 4-node cluster.
2. Create a 3-replica, 1-vgroup database; create table, insert out-of-order data, and verify.
3. Restart dnode2 → insert out-of-order data → verify.
4. Restart dnode3 → insert out-of-order data → verify.
5. Restart dnode4 → insert out-of-order data → verify.
6. Restart dnode3 again → insert out-of-order data → verify.
¶
Write: replica-3 restart
1. Start a 4-node cluster.
2. Create four 1-vgroup, 3-replica databases and a normal table in each.
3. In a background thread, insert one record into every table every 0.1 s (ignore any failures).
4. Sequentially restart dnode1 → dnode2 → dnode3 → dnode4; repeat this full cycle 8 times.
5. After every restart, confirm that row counts never decrease.
¶
Write: repica-3 vgroup-2
1. Start a 4-node cluster.
2. Create a 3-replica database with 2 vgroups and create a super table.
3. Create 300 child tables and insert one record into each.
4. Insert one earlier-timestamp record into each child table.
5. Verify the query results are correct.