CLEAR ORPHAN DATABASES
On this page
Removes orphaned partitions.
Syntax
CLEAR ORPHAN DATABASES;
Remarks
Caution
This command cannot be undone.
-
The master aggregator will not drop orphan partition databases if there is no corresponding master partition.
-
This command causes implicit commits.
Refer to COMMIT for more information. -
To detect orphan partitions, run
SHOW CLUSTER STATUS
and check for partitions with the role ofOrphan
. -
Before running
CLEAR ORPHAN DATABASES
, run:EXPLAIN CLEAR ORPHAN DATABASES;
to see which partitions will be dropped. -
Orphan tables are tables that don't exist in metadata but do exist on some partition databases.
For example, if a table is dropped on the master in asynchronous replication and its node fails before it can succeed then the table could become an orphan table.
Related Topics
Last modified: April 19, 2023