Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ocient.com/llms.txt

Use this file to discover all available pages before exploring further.

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
CREATE TASK [ task_name ]
    TYPE { rebuild | check_disk | rebalance }
    [ LOCATION { SYSTEM | CLUSTER cluster_name | NODE node_name } ]
    [ OPTIONS task_option_map [, ... ] ]
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.
ParameterData TypeDescription
task_nameStringOptional.

The identifier for the task.
TYPEStringRequired. Specifies the type of the distributed task to create. Supported tasks are:

rebuild — Rebuild task
check_disk — Check disk task
rebalance — Rebalance task

Task names are case sensitive.
node_nameStringThis argument is required only if your task targets a node with the LOCATION NODE keywords.

The name of a specific node for the task to target.
cluster_nameStringThis argument is required only if your task targets a cluster with the LOCATION CLUSTER keywords.

The name of a specific cluster for the task to target.
task_option_mapKey-value pairsOptional. A comma-separated list of task-specific options in key-value pair format key = value.

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.
Option KeyValue TypeDescription
nodeStringLimits the rebuild operation to only segments on the specified node.
segment_groupsListLimits the rebuild operation to the specified segment group identifiers. Specify this option as a bracketed list, e.g., [ id1, id2, ... ].
table_idStringLimits the rebuild to segment groups belonging to a specific table identifier.
Examples Rebuild All Segments on the System This example performs a system-wide rebuild task.
SQL
CREATE TASK TYPE rebuild LOCATION SYSTEM;
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
CREATE TASK TYPE rebuild OPTIONS table_id = '529a2e9d-d06c-46cd-a93b-624d3bed1c08';
Rebuild Segments on the Specific Cluster This example rebuilds segments on the Foundation cluster my_lts_cluster1.
SQL
CREATE TASK TYPE rebuild LOCATION CLUSTER my_lts_cluster1;
Rebuild Segments on the Specific Node This example rebuilds segments on the Foundation Node my_node1 in the Foundation Cluster my_lts_cluster1.
SQL
CREATE TASK TYPE rebuild LOCATION CLUSTER my_lts_cluster1 OPTIONS node = 'my_node1';
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 TASK TYPE rebuild LOCATION CLUSTER my_lts_cluster1 OPTIONS segment_groups = [ 53 ];
Create a Named Task This example creates the rebuild task named my_rebuild_task in the Foundation Cluster my_lts_cluster1.
SQL
CREATE TASK my_rebuild_task TYPE rebuild LOCATION CLUSTER my_lts_cluster1;

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.
Option KeyValue TypeDescription
fixBooleanIf you set this option value to true, the task modifies the storage cluster state based on the checksum result. For example, if the task finds a segment that fails the checksum, the task sets its segment state to DAMAGED.

Otherwise, the task reports any segments that fail the checksum, but it does not alter segment states.

The default value is false.
sampleBooleanIf you set this option value to true, the task checks only a sample of data in each segment.

The default value is false.
only_unhealthyBooleanIf you set this option value to true, the task checks only segments that are not in the INTACT state.

The default value is false.
storage_idsListThis option limits the check_disk task to only a specific list of storage identifiers. Specify these storage identifiers as a bracketed list, e.g., [ 'id1', 'id2', ... ].
Examples Perform Checksum on the Specific Node This example computes the checksum on all segments on storage node my_node1.
SQL
CREATE TASK TYPE check_disk LOCATION NODE 'my_node1';
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
CREATE TASK TYPE check_disk LOCATION CLUSTER my_lts_cluster1 OPTIONS sample = true;
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
CREATE TASK TYPE check_disk LOCATION NODE 'my_node1' OPTIONS storage_ids = [ '529a2e9d-d06c-46cd-a93b-624d3bed1c08' ];

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
CREATE TASK TYPE rebalance;

CANCEL TASK 

Cancels a running task.  Privileges To cancel a task, you must be assigned the System Administrator role.  Syntax
SQL
CANCEL TASK ('task_name' | 'task_id')
ParameterData TypeDescription
task_namestringThe name specified on task creation. This applies only if an optional name was created for the task.
task_idstringThe unique identifier for the task in the system tables. 
For rebuild tasks, you can find the unique identifier in the sys.result_cache table.
For check disk tasks, you can find the unique identifier in the sys.subtasks table.
Example  Cancel a task named my_task.
SQL
CANCEL TASK 'my_task';
System Catalog Guide to Rebuilding Segments
Last modified on May 21, 2026