In V95 of the China-domestically developed GBase 8a MPP database from GBASE, both expansion and node replacement are carried out through rebalance. When a task is launched, every table that must take part is inserted into gclusterdb.rebalancing_status. In some cases — for example when a table has been dropped — the number of rows in that task table can go down instead of up.

Symptom

A customer compared the rebalance progress on two consecutive days:

  • Pending STARTING tasks fell from 3255 to 3251.
  • COMPLETED tasks fell from 563 to 560.

Pending tasks only decrease as rebalance proceeds, so 4 tables were indeed processed that day (3255 − 3251). Completed tasks should have risen by 4, yet they dropped by 3 (560 − 563). Why?

Cause

When a rebalance task moves from STARTING to RUNNING, the task is deleted if the table it references no longer exists — for instance because it was dropped. In this case a pending testdb.tencrypt table had been removed.

The same applies to already COMPLETED tasks: if the table is dropped, its task row is removed too. Here a completed testdb.t2 table had been dropped.

So over that period 4 tables took part in rebalance, but 7 tables were dropped in total, which is why the overall task count fell by 3 rather than growing.

Going forward, treat a shrinking task count as a signal to check for dropped tables rather than a failed rebalance: on a gbase cluster the status rows live in a metadata table that follows the tables themselves, so DDL during a rebalance quietly rewrites the reported totals. Freeze schema changes until a gbase expansion finishes, and the database progress numbers will stay comparable from one day to the next.