mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 08:30:35 +00:00
Add a virtual task that exposes in-progress vnodes-to-tablets migrations through the task manager API. The task is synthesized from the current migration state, so completed migrations are not shown. Progress is reported as the number of nodes that currently use tablets: it increases on the forward path and decreases on rollback. For simplicity, per-node storage modes are not exposed in the task status; callers that need them should use the migration status REST endpoint. Unlike regular tasks that use time-based UUIDs, this task uses deterministic named UUIDs derived from the keyspace names. This keeps the implementation simple (no need to persist them) and gives each keyspace a stable task ID. The downside is that the start time of each task is unknown and repeated migrations of the same keyspace (migration -> rollback -> new migration) cannot be distinguished. Introduce a new task manager module to keep them separate from other tasks. Add support for `wait()`. While its practical value is debatable (migration is a manual procedure, rolling restart will interrupt it), it keeps the task consistent with the task manager interface. Signed-off-by: Nikos Dragazis <nikolaos.dragazis@scylladb.com>