Some builds of GBase 8a 953 — the China-domestically developed MPP database from GBASE — add an eventMode option for node replacement. It applies only to data services: replacement of management and scheduling services is unchanged, and the original redistribution-mode data replacement still works. For operators maintaining a gbase cluster, it is an extra path, not a replacement for the old one.
Environment
Supported builds
As of 2025-03-21, the feature is implemented in 9.5.3.28.18R1_Patch.8; it may be merged into other builds later.
Test cluster
A 3-node cluster: 1 management + 1 coordinator + 3 data nodes. One pure data node had failed and was set to unavailable. If the failed node is a composite one, replace its other services with the original method first and leave the data service for last.
===============================================================================================================
| GBASE DATA CLUSTER INFORMATION |
===============================================================================================================
| NodeName | IpAddress | DistributionId | gnode | syncserver | DataState |
---------------------------------------------------------------------------------------------------------------
| node1 | 10.0.2.152 | 1,2 | UNAVAILABLE | | |
---------------------------------------------------------------------------------------------------------------
| node2 | 10.0.2.151 | 1,2 | OPEN | OPEN | 0 |
---------------------------------------------------------------------------------------------------------------
| node3 | 10.0.2.153 | 1,2 | OPEN | OPEN | 0 |
---------------------------------------------------------------------------------------------------------------
The Replacement Command
./replace.py --feventMode --host=10.0.2.152 --dbaUser=gbase --dbaUserPwd=XXXX --generalDBUse=gbase --generalDBPwd=XXXXXX --overwrite --type=data
--feventMode is the new flag: with it, data services are replaced in event mode; without it, the original redistribution mode is used.
Prerequisites
If a rebalance (for example, a scale-out) is running, it must be stopped first:
-
gcluster_rebalancing_concurrent_countmust be set to 0 (set global ...=0). - The
gclusterdb.rebalancing_statustable must be empty (truncate table).
Only after every event on the failed node has recovered should you resume with rebalance instance, which repopulates that table. Both conditions are checked at replacement time, and the command exits with an error if either is unmet.
Execution
The log first confirms both checks:
check rebalance status ...
distribution id list:['2', '1']
gcluster_rebalancing_concurrent_count value was 0 at coordinator 10.0.2.151
table gclusterdb.rebalancing_status was empty
check rebalance status successful
It then uninstalls and reinstalls the node, syncs cluster config and kerberos files, switches the cluster into READONLY, clears the ddl/dml/dmlstorage event logs on the replaced node, and syncs data-server metadata. Metadata sync took 46,898 ms; the whole replacement 101,831 ms:
sync dataserver metedata end, spend time 46898 ms ......
replace nodes spend time: 101831 ms
set dmlstorageevent success
please wait all dmlstorageevent recover success, do not start rebalance before it
Replace gcluster nodes successfully.
That last line is the operational warning: do not start a rebalance again until the events have finished recovering.
Choosing Between the Two Modes
This is simply a new implementation, and it does not affect the original redistribution-mode replacement.
- Downside: it generates a large number of events, so you cannot control the impact on running business workloads as precisely as redistribution mode does through parallelism.
- Upside: a node replacement can be completed first, even when a scale-out rebalance is only halfway through.
Going forward, if a node fails mid-expansion, eventMode frees the replacement from waiting for the rebalance to finish; if predictable impact on production traffic matters more, the original redistribution mode remains the safer choice for the gbase database.
Top comments (0)