alter task

Suspend, resume, or cancel scheduled chunk or replication unit management operations on a sharded database.

Syntax

ALTER TASK
         {-RESUME|-SUSPEND|-CANCEL}
         [ -TASK task | [[-CHUNK chunk_id_list] |  [-RU ru_lst] | [-SHARD shard]]]
         [-verbose]] 
         

Options

Table 2-17 GDSCTL alter task Options

Option Description
-cancel

Removes chunks for the specified scope from the scheduled list. "-chunk" specifies that all listed chunks will be removed, "-shard" specifies that all chunk moves to/from this database will be removed. If any chunk in scope is already in a move a warning is returned indicating that the chunk was not removed.

-chunk

List of numeric chunk identifiers or ALL for all chunks.

-resume

Restarts stalled move process, optional parameter "-shard" provides a list of databases that will have their "move failed" flags reset before move restarts.

-ru

A comma separated list of replication units.

-shard

A comma separated list of shards.

-suspend

Suspends move for the specified scope. -chunk specifies chunks to suspend, "-shard specifies that all chunk moves to/from that database will be suspended. If any chunk in scope is already in a move (any state other than "scheduled") a warning is returned indicating that move for that chunk was not suspended.

-task

A comma separated list of tasks.

-verbose

Enable verbose output mode.

Usage Notes

RESUME option is used to restart stalled task. SUSPEND is used to postpone task, and CANCEL cancels task.

CHUNK, RU or SHARD is used to filter the list of scheduled migration. Use CONFIG TASK command to retrieve the list of scheduled tasks.

Examples

Suspend all pending tasks:

GDSCTL> alter task -suspend

Delete all tasks involving (ru 3 or 4) AND (shards shard1 or shard2):

GDSCTL> alter task -cancel -ru 3,4 -shard shard1,shard2

Suspend any task involving ru 5 in any way:

GDSCTL> alter task -suspend -ru 5

Resumes specified tasks:

GDSCTL> alter task -resume -task 34,35,36