Get a topic's storage mode migration status

POST /redpanda.core.admin.v2.TopicService/GetTopicStorageModeMigrationStatus

Reports the progress of a topic's storage mode migration from local or tiered_v1 to cloud or tiered_v2: the topic-level status and how many of its partitions have finished migrating. The controller records partition progress about every 10 seconds, so it can trail the actual migration by about that much.

Headers

  • Connect-Protocol-Version number Required

    Define the version of the Connect protocol

    Value is 1.

  • Connect-Timeout-Ms number

    Define the timeout, in ms

application/json

Body Required

  • topic string

    Name of the topic to report on. The topic must already exist; the request fails with a not-found error otherwise.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • backedOffPartitions array[integer(int32)]

      IDs, in ascending order, of the admitted partitions whose migration gave up after making no progress for topic_storage_mode_migration_error_backoff_timeout. Each stays in its pre-migration storage mode until retried with RetryPartitionStorageModeMigration. No more of the topic's partitions are admitted until then. A partition whose leader does not answer is left out.

    • migratedFrom string

      Storage mode the topic migrated from, as a redpanda.storage.mode.impl value such as local or tiered_v1. Empty when the topic has never migrated.

    • partitionsAdmitted integer(int32)

      Number of the topic's partitions admitted to migrate so far: partitions with an ID below this value may start migrating, or have started or finished. Rises as earlier partitions finish, keeping at most topic_storage_mode_migration_max_concurrent_partitions partitions migrating across the cluster, until it reaches partitions_to_migrate. Holds while any of the topic's partitions are in backed_off_partitions. Zero when the topic has never migrated, and at the start of a migration before any partition is admitted.

    • partitionsComplete integer(int32)

      Number of partitions counted in partitions_to_migrate that have finished migrating. Zero when the topic has never migrated.

    • partitionsToMigrate integer(int32)

      Number of the topic's partitions that migrate: those that existed when the migration started. Partitions added later are created in the target storage mode and are not counted. Zero when the topic has never migrated.

    • status string

      Whether the topic has no migration, is migrating, or has finished migrating.

      Values are TOPIC_STORAGE_MODE_MIGRATION_STATUS_UNSPECIFIED, TOPIC_STORAGE_MODE_MIGRATION_STATUS_NONE, TOPIC_STORAGE_MODE_MIGRATION_STATUS_MIGRATING, or TOPIC_STORAGE_MODE_MIGRATION_STATUS_COMPLETE.

  • default application/json

    Error

    Hide response attributes Show response attributes object
    • code string

      The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

      Values are canceled, unknown, invalid_argument, deadline_exceeded, not_found, already_exists, permission_denied, resource_exhausted, failed_precondition, aborted, out_of_range, unimplemented, internal, unavailable, data_loss, or unauthenticated.

    • details array[object]

      A list of messages that carry the error details. There is no limit on the number of messages.

      Hide details attributes Show details attributes object

      Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.

      • debug object

        Detailed error information.

        Additional properties are allowed.

      • type string

        A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo. This is used to determine the schema of the data in the value field and is the discriminator for the debug field.

      • value string(binary)

        The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

    • message string

      A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

POST /redpanda.core.admin.v2.TopicService/GetTopicStorageModeMigrationStatus
curl \
 --request POST 'http://localhost:9644/redpanda.core.admin.v2.TopicService/GetTopicStorageModeMigrationStatus' \
 --header "Content-Type: application/json" \
 --header "Connect-Protocol-Version: 1" \
 --header "Connect-Timeout-Ms: 42.0" \
 --data '{
  "topic": "string"
}'
Request examples
# Headers
Connect-Protocol-Version: 1
Connect-Timeout-Ms: 42.0

# Payload
{
  "topic": "string"
}
Response examples (200)
{
  "backedOffPartitions": [
    42
  ],
  "migratedFrom": "string",
  "partitionsAdmitted": 42,
  "partitionsComplete": 42,
  "partitionsToMigrate": 42,
  "status": "TOPIC_STORAGE_MODE_MIGRATION_STATUS_UNSPECIFIED"
}
Response examples (default)
{
  "code": "not_found",
  "details": [
    {
      "debug": {},
      "type": "string",
      "value": "@file"
    }
  ],
  "message": "string"
}