Skip to main content
You can manage distributed tasks in the System. These tasks are processes that execute in the background to keep the system running smoothly and efficiently. These DDL commands create tasks to rebuild damaged or missing segment data and check data integrity. For information on managing tasks, see Manage Distributed Tasks.

CREATE TASK

Launches a new task. Privileges To create any task, you must have the System Administrator role, which has the UPDATE privileges on the system. Syntax
SQL
To create a task, you must specify a task type TYPE:
  • rebuild — Reconstruct data segments by using erasure-coded data in the same segment group.
  • check_disk — Verify segments on a node by computing checksums.
  • rebalance — Distribute data evenly across disks in the system.
You can also optionally specify a location using the LOCATION keyword to execute the task. Supported values include:
  • SYSTEM — Targets all segments in the system. If you do not specify the LOCATION keyword, SYSTEM is the default value.
  • CLUSTER — Targets a specific cluster.
  • NODE — Targets a specific node.

rebuild Task

Performing a rebuild segment operation reconstructs data segments by using erasure-coded data in the same segment group. This task allows the system to restore segments that are in the damaged DAMAGED or missing MISSING status to full performance. For details on rebuild tasks, see Guide to Rebuilding Segments.
The rebuild task supports only the SYSTEM and CLUSTER locations. If you attempt the rebuild task on the node, the system returns an error.To rebuild a single node, use the cluster location with the LOCATION CLUSTER keywords. Include the name of the node you want to rebuild as one of the key-value options.
rebuild Options (task_option_map) The rebuild task supports these options. You must specify these options as a comma-separated list of key-value pairs. Examples Rebuild All Segments on the System This example performs a system-wide rebuild task.
SQL
Rebuild Segments on the Specific Table This example rebuilds all segments on a system for the specified table with the table identifier 529a2e9d-d06c-46cd-a93b-624d3bed1c08.
SQL
Rebuild Segments on the Specific Cluster This example rebuilds segments on the Foundation cluster my_lts_cluster1.
SQL
Rebuild Segments on the Specific Node This example rebuilds segments on the Foundation Node my_node1 in the Foundation Cluster my_lts_cluster1.
SQL
Rebuild the Specific Segment Group This example rebuilds segments in the segment group with the identifier 53 in the Foundation Cluster my_lts_cluster1.
SQL
Create a Named Task This example creates the rebuild task named my_rebuild_task in the Foundation Cluster my_lts_cluster1.
SQL

check_disk Task

The check_disk task verifies the integrity of data segments on storage nodes by computing checksums. The task compares stored checksums with recomputed ones to detect disk corruption. check_disk Options (task_option_map) The check_disk task supports these options. You must specify these options as a comma-separated list of key-value pairs. Examples Perform Checksum on the Specific Node This example computes the checksum on all segments on storage node my_node1.
SQL
Perform a Checksum on the Specific Cluster This example computes a checksum for a sample of blocks in each segment of the storage cluster my_lts_cluster1 using the sample = true key-value pair.
SQL
Compute Checksum on the Specific Storage Identifier This example computes a checksum for the segment with the storage identifier 529a2e9d-d06c-46cd-a93b-624d3bed1c08 on the storage node my_node1.
SQL

rebalance Task

Rebalancing evenly distributes data across disks in the system. Execute this task if data is not properly balanced across the system, such as after adding nodes or drives. For details on performing a rebalance task, see Expand and Rebalance System.
The rebalance task supports only SYSTEM and CLUSTER locations. If you attempt the rebalance task on a node, the system returns an error.
Example This example performs a rebalance task across all foundation clusters.
SQL

CANCEL TASK

Cancels a running task. Privileges To cancel a task, you must be assigned the System Administrator role. Syntax
SQL
Example Cancel a task named my_task.
SQL

DROP TASK

Drops orphaned or completed tasks from the system. The task identifier must be a task Universally Unique IDentifier (UUID). The statement does not accept task names because names are not globally unique. A name becomes reusable after its prior task reaches a terminal status, which makes name-based lookup ambiguous. The terminal task statuses are FAILED, CANCELLED, INVALID, COMPLETE, and QUIESCED. By default, when you do not specify any optional keywords, the DROP TASK SQL statement drops a single leaf task. The database throws an error if the task has children or is not in a terminal status. Privileges To drop a task, you must be assigned the System Administrator role. If you have the System Administrator role, you can drop any task. If you are not an administrator, you can drop COALESCE tasks for which you have CREATE privileges or pipeline tasks for which you have EXECUTE privileges. Syntax
SQL
The optional keywords are:
  • IF EXISTS — Prevents the statement from returning an error when the task is not found.
  • CASCADE — Drops the entire subtree rooted at the specified task. All tasks in the subtree must be in a terminal status.
  • FORCE — Skips the terminal-status checks. You can combine the FORCE with CASCADE keywords to force the drop of an entire subtree regardless of task status.
Generally, terminal tasks automatically roll off the system, so executing the DROP TASK SQL statement is not necessary. However, the FORCE and CASCADE keywords can help you drop orphaned tasks from the system in the event of an internal lockup. Be aware that this statement can unintentionally delete the state of in-progress tasks.
Examples Drop a Single Leaf Task This example drops a single leaf task using its UUID.
SQL
Drop a Task Only If It Exists This example drops a task and does not return an error if the system cannot find it.
SQL
Drop a Task and Its Subtree This example drops the specified task and all tasks in its subtree. All tasks in the subtree must be in a terminal status.
SQL
Force the Drop of a Task Subtree This example drops the specified task and its entire subtree, regardless of the task status.
SQL
System Catalog Guide to Rebuilding Segments
Last modified on June 29, 2026