ScyllaDB University LIVE, FREE Virtual Training Event | March 21
Register for Free
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB Enterprise ScyllaDB for Administrators Admin Tools Task manager tasks

Caution

You're viewing documentation for a previous version. Switch to the latest stable version.

Task manager tasks¶

Task manager tracks long-running background operations. Task manager is divided into modules. Each module is responsible for tracking operations of similar purposes (e.g. compactions). The operation and its parts are represented by tasks. Tasks form a tree, where the root task covers the whole operation (e.g. compaction) and its children cover its suboperations (e.g. compaction of one table), etc.

There are two types of tasks: cluster and node tasks. Node tasks cover operations that are performed on a single node. To see their stats, you need to request the status from a particular node. Cluster tasks are responsible for the operations that spread across many nodes. They are visible from all nodes in the cluster. Cluster tasks can’t have parents. They can have children on many nodes. The status of a cluster task’s child may not be accessible even though the cluster operation is still running.

A task may be internal. This means that the task has a parent or is started by an internal process. By default API calls skip the internal tasks. Cluster tasks cannot be internal.

If a task is internal, it is unregistered from task manager immediately after it is finished. If it has a non-cluster parent, the task’s status is folded into its parent and accessible only through the parent. You won’t see the statuses of indirect descendants (e.g. children of children) of a finished task unless they have failed.

Other non-cluster tasks stay in task manager for task_ttl seconds after they are finished or user_task_ttl seconds if they were started by user. task_ttl value can be set with task_ttl_in_seconds param or through /task_manager/ttl api. user_task_ttl value can be set with user_task_ttl_in_seconds param or through /task_manager/user_ttl api. The time for which cluster tasks are visible in task manager isn’t specified.

Task manager API¶

Data structures¶

Task data, that is returned from the task manager API, is kept in either task_stats or task_status.

task_stats¶

  • task_id - unique task id;

  • type - a type of the task, e.g. offstrategy compaction;

  • kind - whether the task is per node or cluster;

  • scope - specifies the operation’s scope, e.g. keyspace, range;

  • state - one of created, running, done, failed;

  • sequence_number - an operation number (per module). It is shared by all tasks in a tree. Irrelevant for cluster tasks;

  • keyspace - optional, name of a keyspace on which the task operates;

  • table - optional, name of a table on which the task operates;

  • entity - optional, additional info specific to the task;

  • shard - optional, shard id on which the task operates;

  • start_time - relevant only if state != created;

  • end_time - relevant only if the task is finished (state in [done, failed]).

task_status¶

All fields from task_stats and additionally:

  • is_abortable - a flag that decides whether the task can be aborted through API;

  • error - relevant only if the task failed;

  • parent_id - relevant only if the task has a parent;

  • progress_units - a unit of progress;

  • progress_total - job size in progress_units;

  • progress_completed - current progress in progress_units;

  • children_ids - list of pairs of children ids and nodes on which they are created.

API calls¶

  • /task_manager/list_modules - lists modules supported by task manager;

  • /task_manager/list_module_tasks/{module} - lists tasks in the module; query params:

    • internal - if set, internal tasks are listed, false by default;

    • keyspace - if set, tasks are filtered to contain only the ones working on this keyspace;

    • table - if set, tasks are filtered to contain only the ones working on this table;

  • /task_manager/task_status/{task_id} - gets the task’s status;

  • /task_manager/abort_task/{task_id} - aborts the task if it’s abortable, otherwise 403 status code is returned;

  • /task_manager/wait_task/{task_id} - waits for the task and gets its status; query params:

    • timeout - timeout in seconds; if set - 408 status code is returned if waiting times out;

  • /task_manager/task_status_recursive/{task_id} - gets statuses of the task and all its descendants in BFS order;

  • /task_manager/ttl - gets or sets new ttl; query params (if setting):

    • ttl - new ttl value.

  • /task_manager/user_ttl - gets or sets new user ttl; query params (if setting):

    • user_ttl - new user ttl value.

  • /task_manager/drain/{module} - unregisters all finished local tasks in the module.

Cluster tasks are not unregistered from task manager with API calls.

Tasks API¶

With task manager, we can have asynchronous versions of synchronous calls. Some of them are accessible from tasks API. The calls work analogically as their synchronous versions, but instead of waiting for the operation to be done, they return the id of the associated task. You can query the operation’s status with task manager API.

See Nodetool tasks.

To learn how to interact with REST API see REST API.

Was this page helpful?

PREVIOUS
Maintenance mode
NEXT
Upgrade ScyllaDB
  • Create an issue

On this page

  • Task manager tasks
    • Task manager API
      • Data structures
        • task_stats
        • task_status
      • API calls
    • Tasks API
ScyllaDB Enterprise
  • enterprise
    • 2024.2
    • 2024.1
    • 2023.1
    • 2022.2
  • Getting Started
    • Install ScyllaDB Enterprise
      • ScyllaDB Web Installer for Linux
      • Install ScyllaDB Without root Privileges
      • Install scylla-jmx Package
      • Air-gapped Server Installation
      • ScyllaDB Housekeeping and how to disable it
      • ScyllaDB Developer Mode
      • Launch ScyllaDB on AWS
      • Launch ScyllaDB on GCP
      • Launch ScyllaDB on Azure
    • Configure ScyllaDB
    • ScyllaDB Configuration Reference
    • ScyllaDB Requirements
      • System Requirements
      • OS Support
      • Cloud Instance Recommendations
      • ScyllaDB in a Shared Environment
    • Migrate to ScyllaDB
      • Migration Process from Cassandra to ScyllaDB
      • ScyllaDB and Apache Cassandra Compatibility
      • Migration Tools Overview
    • Integration Solutions
      • Integrate ScyllaDB with Spark
      • Integrate ScyllaDB with KairosDB
      • Integrate ScyllaDB with Presto
      • Integrate ScyllaDB with Elasticsearch
      • Integrate ScyllaDB with Kubernetes
      • Integrate ScyllaDB with the JanusGraph Graph Data System
      • Integrate ScyllaDB with DataDog
      • Integrate ScyllaDB with Kafka
      • Integrate ScyllaDB with IOTA Chronicle
      • Integrate ScyllaDB with Spring
      • Shard-Aware Kafka Connector for ScyllaDB
      • Install ScyllaDB with Ansible
      • Integrate ScyllaDB with Databricks
      • Integrate ScyllaDB with Jaeger Server
      • Integrate ScyllaDB with MindsDB
    • Tutorials
  • ScyllaDB for Administrators
    • Administration Guide
    • Procedures
      • Cluster Management
      • Backup & Restore
      • Change Configuration
      • Maintenance
      • Best Practices
      • Benchmarking ScyllaDB
      • Migrate from Cassandra to ScyllaDB
      • Disable Housekeeping
    • Security
      • ScyllaDB Security Checklist
      • Enable Authentication
      • Enable and Disable Authentication Without Downtime
      • Creating a Custom Superuser
      • Generate a cqlshrc File
      • Reset Authenticator Password
      • Enable Authorization
      • Grant Authorization CQL Reference
      • Certificate-based Authentication
      • Role Based Access Control (RBAC)
      • ScyllaDB Auditing Guide
      • Encryption: Data in Transit Client to Node
      • Encryption: Data in Transit Node to Node
      • Generating a self-signed Certificate Chain Using openssl
      • Configure SaslauthdAuthenticator
      • Encryption at Rest
      • LDAP Authentication
      • LDAP Authorization (Role Management)
      • Software Bill Of Materials (SBOM)
    • Admin Tools
      • Nodetool Reference
      • CQLSh
      • Admin REST API
      • Tracing
      • ScyllaDB SStable
      • ScyllaDB Types
      • SSTableLoader
      • cassandra-stress
      • SSTabledump
      • SSTableMetadata
      • ScyllaDB Logs
      • Seastar Perftune
      • Virtual Tables
      • Reading mutation fragments
      • Maintenance socket
      • Maintenance mode
      • Task manager
    • Version Support Policy
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
    • ScyllaDB Manager
    • Upgrade Procedures
      • About Upgrade
      • Upgrade Guides
    • System Configuration
      • System Configuration Guide
      • scylla.yaml
      • ScyllaDB Snitches
    • Benchmarking ScyllaDB
    • ScyllaDB Diagnostic Tools
  • ScyllaDB for Developers
    • Develop with ScyllaDB
    • Tutorials and Example Projects
    • Learn to Use ScyllaDB
    • ScyllaDB Alternator
    • ScyllaDB Drivers
      • ScyllaDB CQL Drivers
      • ScyllaDB DynamoDB Drivers
  • CQL Reference
    • CQLSh: the CQL shell
    • Appendices
    • Compaction
    • Consistency Levels
    • Consistency Level Calculator
    • Data Definition
    • Data Manipulation
      • SELECT
      • INSERT
      • UPDATE
      • DELETE
      • BATCH
    • Data Types
    • Definitions
    • Global Secondary Indexes
    • Expiring Data with Time to Live (TTL)
    • Functions
    • Wasm support for user-defined functions
    • JSON Support
    • Materialized Views
    • Non-Reserved CQL Keywords
    • Reserved CQL Keywords
    • DESCRIBE SCHEMA
    • Service Levels
    • ScyllaDB CQL Extensions
  • Features
    • Lightweight Transactions
    • Global Secondary Indexes
    • Local Secondary Indexes
    • Materialized Views
    • Counters
    • Change Data Capture
      • CDC Overview
      • The CDC Log Table
      • Basic operations in CDC
      • CDC Streams
      • CDC Stream Generations
      • Querying CDC Streams
      • Advanced column types
      • Preimages and postimages
      • Data Consistency in CDC
    • Workload Attributes
    • Workload Prioritization
  • ScyllaDB Architecture
    • Data Distribution with Tablets
    • ScyllaDB Ring Architecture
    • ScyllaDB Fault Tolerance
    • Consistency Level Console Demo
    • ScyllaDB Anti-Entropy
      • ScyllaDB Hinted Handoff
      • ScyllaDB Read Repair
      • ScyllaDB Repair
    • SSTable
      • ScyllaDB SSTable - 2.x
      • ScyllaDB SSTable - 3.x
    • Compaction Strategies
    • Raft Consensus Algorithm in ScyllaDB
    • Zero-token Nodes
  • Troubleshooting ScyllaDB
    • Errors and Support
      • Report a ScyllaDB problem
      • Error Messages
      • Change Log Level
    • ScyllaDB Startup
      • Ownership Problems
      • ScyllaDB will not Start
      • ScyllaDB Python Script broken
    • Upgrade
      • Inaccessible configuration files after ScyllaDB upgrade
    • Cluster and Node
      • Handling Node Failures
      • Failure to Add, Remove, or Replace a Node
      • Failed Decommission Problem
      • Cluster Timeouts
      • Node Joined With No Data
      • NullPointerException
      • Failed Schema Sync
    • Data Modeling
      • ScyllaDB Large Partitions Table
      • ScyllaDB Large Rows and Cells Table
      • Large Partitions Hunting
      • Failure to Update the Schema
    • Data Storage and SSTables
      • Space Utilization Increasing
      • Disk Space is not Reclaimed
      • SSTable Corruption Problem
      • Pointless Compactions
      • Limiting Compaction
    • CQL
      • Time Range Query Fails
      • COPY FROM Fails
      • CQL Connection Table
    • ScyllaDB Monitor and Manager
      • Manager and Monitoring integration
      • Manager lists healthy nodes as down
    • Installation and Removal
      • Removing ScyllaDB on Ubuntu breaks system packages
  • Knowledge Base
    • Upgrading from experimental CDC
    • Compaction
    • Consistency in ScyllaDB
    • Counting all rows in a table is slow
    • CQL Query Does Not Display Entire Result Set
    • When CQLSh query returns partial results with followed by “More”
    • Run ScyllaDB and supporting services as a custom user:group
    • Customizing CPUSET
    • Decoding Stack Traces
    • Snapshots and Disk Utilization
    • DPDK mode
    • Debug your database with Flame Graphs
    • Efficient Tombstone Garbage Collection in ICS
    • How to Change gc_grace_seconds for a Table
    • Gossip in ScyllaDB
    • Increase Permission Cache to Avoid Non-paged Queries
    • How does ScyllaDB LWT Differ from Apache Cassandra ?
    • Map CPUs to ScyllaDB Shards
    • ScyllaDB Memory Usage
    • NTP Configuration for ScyllaDB
    • Updating the Mode in perftune.yaml After a ScyllaDB Upgrade
    • POSIX networking for ScyllaDB
    • ScyllaDB consistency quiz for administrators
    • Recreate RAID devices
    • How to Safely Increase the Replication Factor
    • ScyllaDB and Spark integration
    • Increase ScyllaDB resource limits over systemd
    • ScyllaDB Seed Nodes
    • How to Set up a Swap Space
    • ScyllaDB Snapshots
    • ScyllaDB payload sent duplicated static columns
    • Stopping a local repair
    • System Limits
    • How to flush old tombstones from a table
    • Time to Live (TTL) and Compaction
    • ScyllaDB Nodes are Unresponsive
    • Update a Primary Key
    • Using the perf utility with ScyllaDB
    • Configure ScyllaDB Networking with Multiple NIC/IP Combinations
  • Reference
    • AWS Images
    • Azure Images
    • GCP Images
    • Configuration Parameters
    • Glossary
    • Limits
    • ScyllaDB Enterprise vs. Open Source Matrix
    • API Reference (BETA)
    • Metrics (BETA)
  • ScyllaDB University
  • ScyllaDB FAQ
  • Alternator: DynamoDB API in Scylla
    • Getting Started With ScyllaDB Alternator
    • ScyllaDB Alternator for DynamoDB users
    • Alternator-specific APIs
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 09 Apr 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6