1.1

Table Of Contents
Rebalancing is a SQLFire member operation that affects partitioned tables created in the cluster. Rebalancing
performs two tasks:
If the a partitioned table's redundancy setting is not satised, rebalancing does what it can to recover redundancy.
See Making a Partitioned Table Highly Available on page 66.
Rebalancing moves the partitioned table's data buckets between host members as needed to establish the best
balance of data across the distributed system.
For efciency, when starting multiple members, trigger the rebalance a single time, after you have added all
members.
Note: If you have transactions running in your system, be careful in planning your rebalancing operations.
Rebalancing may move data between members, which could cause a running transaction to fail with a
TransactionDataRebalancedException.
Start a rebalance operation using one of the following options:
At the command line when you boot a SQLFire server:
sqlf server start -rebalance
Eexecuting a system procedure in a running SQLFire member:
call sys.rebalance_all_buckets();
This procedure initiates rebalancing of buckets across the entire SQLFire cluster for all partitioned tables.
How Partitioned Table Rebalancing Works
The rebalancing operation runs asynchronously.
As a general rule, rebalancing takes place on one partitioned table at a time. For tables that have colocated data,
rebalancing works on the tables as a group, maintaining the data colocation between the tables.
You can continue to access partitioned tables while rebalancing is in progress. Queries, DML operations, and
procedure executions continue while data is moving. If a procedure executes on a local data set, you may see a
performance degradation if that data moves to another member during procedure execution. Future invocations
are routed to the correct member.
For tables that are congured with expiration based on idle time, the rebalancing operation resets the last accessed
time of the table entries on buckets that are moved.
When to Rebalance a Partitioned Table
You typically want to trigger rebalancing when overall capacity is increased or reduced through member startup,
shut down or failure.
You may also need to rebalance when you use partitioned table redundancy for high availability, and you have
congured your table to not automatically recover redundancy after a SQLFire member fails (the default
RECOVERYDELAY setting). In this case, SQLFire only restores redundancy when you invoke a rebalance
operation. See Making a Partitioned Table Highly Available on page 66.
Managing Replication Failures
SQLFire uses multiple failure detection algorithms to detect replication problems quickly. SQLFire replication
design focuses on consistency, and does not allow suspect members or network-partitioned members to operate
in isolation.
67
Partitioning Tables