From 94c7e3ffb9878728c7d8189d351dd065a27049ce Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 28 Oct 2025 13:56:01 -0700 Subject: [PATCH 1/3] DOC-5867: add new CLUSTER MIGRATION command page (etc) --- content/commands/client-list.md | 4 +- content/commands/cluster-countkeysinslot.md | 2 + content/commands/cluster-getkeysinslot.md | 2 + content/commands/cluster-info.md | 10 + content/commands/cluster-migration.md | 208 ++++++++++++++++++++ content/commands/info.md | 12 +- 6 files changed, 236 insertions(+), 2 deletions(-) create mode 100644 content/commands/cluster-migration.md diff --git a/content/commands/client-list.md b/content/commands/client-list.md index f4ce6c105a..e7cac5ef0d 100644 --- a/content/commands/client-list.md +++ b/content/commands/client-list.md @@ -135,9 +135,11 @@ b: the client is waiting in a blocking operation c: connection to be closed after writing entire reply d: a watched keys has been modified - EXEC will fail e: the client is excluded from the client eviction mechanism +g: the client is responsible for migrating slots (atomic slot migration) i: the client is waiting for a VM I/O (deprecated) M: the client is a master N: no specific flag set +o: the client is responsible for importing slots (atomic slot migration) O: the client is a client in MONITOR mode P: the client is a Pub/Sub subscriber r: the client is in readonly mode against a cluster node @@ -148,7 +150,7 @@ x: the client is in a MULTI/EXEC context t: the client enabled keys tracking in order to perform client side caching T: the client will not touch the LRU/LFU of the keys it accesses R: the client tracking target client is invalid -B: the client enabled broadcast tracking mode +B: the client enabled broadcast tracking mode ``` The file descriptor events can be: diff --git a/content/commands/cluster-countkeysinslot.md b/content/commands/cluster-countkeysinslot.md index 40e0db713f..657d7b272b 100644 --- a/content/commands/cluster-countkeysinslot.md +++ b/content/commands/cluster-countkeysinslot.md @@ -34,6 +34,8 @@ command only queries the local data set, so contacting a node that is not serving the specified hash slot will always result in a count of zero being returned. +**Note:** During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. + ``` > CLUSTER COUNTKEYSINSLOT 7000 (integer) 50341 diff --git a/content/commands/cluster-getkeysinslot.md b/content/commands/cluster-getkeysinslot.md index 8985ca79d1..4a86db46f8 100644 --- a/content/commands/cluster-getkeysinslot.md +++ b/content/commands/cluster-getkeysinslot.md @@ -44,6 +44,8 @@ node to another. The way the rehashing is performed is exposed in the Redis Cluster specification, or in a more simple to digest form, as an appendix of the [`CLUSTER SETSLOT`]({{< relref "/commands/cluster-setslot" >}}) command documentation. +**Note:** During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. + ``` > CLUSTER GETKEYSINSLOT 7000 3 1) "key_39015" diff --git a/content/commands/cluster-info.md b/content/commands/cluster-info.md index 4d83b462c6..add7d7454a 100644 --- a/content/commands/cluster-info.md +++ b/content/commands/cluster-info.md @@ -58,6 +58,16 @@ total_cluster_links_buffer_limit_exceeded:0 * `cluster_stats_messages_received`: Number of messages received via the cluster node-to-node binary bus. * `total_cluster_links_buffer_limit_exceeded`: Accumulated count of cluster links freed due to exceeding the `cluster-link-sendbuf-limit` configuration. +The following atomic slot migration fields may be included in the reply (available since Redis 8.4.0): + +* `cluster_slot_migration_active_tasks`: Number of in-progress ASM tasks. Currently, it will be 1 or 0. +* `cluster_slot_migration_active_trim_running`: Number of active trim jobs in progress and scheduled. +* `cluster_slot_migration_active_trim_current_job_keys`: Number of keys scheduled for deletion in the current trim job. +* `cluster_slot_migration_active_trim_current_job_trimmed`: Number of keys already deleted in the current trim job. +* `cluster_slot_migration_stats_active_trim_started`: Total number of trim jobs that have started since the process began. +* `cluster_slot_migration_stats_active_trim_completed`: Total number of trim jobs completed since the process began. +* `cluster_slot_migration_stats_active_trim_cancelled`: Total number of trim jobs cancelled since the process began. + The following message-related fields may be included in the reply if the value is not 0: Each message type includes statistics on the number of messages sent and received. Here are the explanation of these fields: diff --git a/content/commands/cluster-migration.md b/content/commands/cluster-migration.md new file mode 100644 index 0000000000..bb2573028d --- /dev/null +++ b/content/commands/cluster-migration.md @@ -0,0 +1,208 @@ +--- +acl_categories: +- '@admin' +- '@slow' +- '@dangerous' +arguments: +- arguments: + - arguments: + - display_text: start-slot + name: start-slot + type: integer + - display_text: end-slot + name: end-slot + type: integer + multiple: true + name: import + token: IMPORT + type: block + - arguments: + - display_text: task-id + name: task-id + token: ID + type: string + - display_text: all + name: all + token: ALL + type: pure-token + name: cancel + token: CANCEL + type: oneof + - arguments: + - display_text: task-id + name: task-id + optional: true + token: ID + type: string + - display_text: all + name: all + optional: true + token: ALL + type: pure-token + name: status + token: STATUS + type: block + name: subcommand + type: oneof +arity: -4 +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +command_flags: +- admin +- stale +- no_async_loading +complexity: O(N) where N is the total number of the slots between the start slot and + end slot arguments. +description: Start, monitor, and cancel atomic slot migration tasks. +group: cluster +hidden: false +linkTitle: CLUSTER MIGRATION +since: 8.4.0 +summary: Start, monitor, and cancel atomic slot migration tasks. +syntax_fmt: "CLUSTER MIGRATION | STATUS\_[ID\_task-id] [ALL]>" +syntax_str: '' +title: CLUSTER MIGRATION +--- + +The `CLUSTER MIGRATION` command provides atomic slot migration functionality for Redis Cluster. This command allows you to import slots from other nodes, monitor the progress of migration tasks, and cancel ongoing migrations. + +## Required arguments + +
subcommand + +The subcommand specifies the operation to perform: + +- `IMPORT [ ...]`: Executes on the destination master. Accepts multiple slot ranges and triggers atomic migration for the specified ranges. Returns a task ID that can be used to monitor the status of the task. + +- `CANCEL [ID | ALL]`: Cancels an ongoing migration task by its ID or cancels all tasks if `ALL` is specified. Note: Cancelling a task on the source node does not stop the migration on the destination node, which will continue retrying until it is also cancelled there. + +- `STATUS [ID | ALL]`: Displays the status of current and completed atomic slot migration tasks. If a specific task ID is provided, it returns detailed information for that task only. If no arguments are provided, returns status for all tasks. + +
+ +## Examples + +Import slots 0-1000 and 2000-3000 to the current node: + +```bash +CLUSTER MIGRATION IMPORT 0 1000 2000 3000 +``` + +Check the status of all migration tasks: + +```bash +CLUSTER MIGRATION STATUS ALL +``` + +Check the status of a specific migration task: + +```bash +CLUSTER MIGRATION STATUS ID 24cf41718b20f7f05901743dffc40bc9b15db339 +``` + +Cancel a specific migration task: + +```bash +CLUSTER MIGRATION CANCEL ID 24cf41718b20f7f05901743dffc40bc9b15db339 +``` + +Cancel all migration tasks: + +```bash +CLUSTER MIGRATION CANCEL ALL +``` + +## Return information + +{{< multitabs id="return-info" + tab1="RESP2" + tab2="RESP3" >}} + +For the `IMPORT` subcommand: +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): task ID on success, or error message on failure. + +For the `CANCEL` subcommand: +[Integer reply](../../develop/reference/protocol-spec#integers): number of cancelled tasks. + +For the `STATUS` subcommand: +[Array reply](../../develop/reference/protocol-spec#arrays): a list of migration task details. Each task is represented as an array containing field-value pairs: +- `id`: Task identifier +- `slots`: Slot range being migrated +- `source`: Source node ID +- `dest`: Destination node ID +- `operation`: Operation type (typically "migrate") +- `state`: Current state ("completed", "in_progress", etc.) +- `last_error`: Last error message (empty if none) +- `retries`: Number of retry attempts +- `create_time`: Task creation timestamp +- `start_time`: Task start timestamp +- `end_time`: Task completion timestamp (if completed) +- `write_pause_ms`: Write pause duration in milliseconds + +-tab-sep- + +For the `IMPORT` subcommand: +[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): task ID on success, or error message on failure. + +For the `CANCEL` subcommand: +[Integer reply](../../develop/reference/protocol-spec#integers): number of cancelled tasks. + +For the `STATUS` subcommand: +[Array reply](../../develop/reference/protocol-spec#arrays): a list of migration task details. Each task is represented as an array containing field-value pairs: +- `id`: Task identifier +- `slots`: Slot range being migrated +- `source`: Source node ID +- `dest`: Destination node ID +- `operation`: Operation type (typically "migrate") +- `state`: Current state ("completed", "in_progress", etc.) +- `last_error`: Last error message (empty if none) +- `retries`: Number of retry attempts +- `create_time`: Task creation timestamp +- `start_time`: Task start timestamp +- `end_time`: Task completion timestamp (if completed) +- `write_pause_ms`: Write pause duration in milliseconds + +{{< /multitabs >}} + +## Notes + +- The atomic slot migration feature is available starting from Redis 8.4.0. +- Migration tasks are tracked in memory and the number of archived tasks is controlled by the `cluster-slot-migration-max-archived-tasks` configuration (default: 32). +- During migration, the source node may pause writes briefly to hand off slot ownership. The duration is controlled by `cluster-slot-migration-write-pause-timeout` (default: 10 seconds). +- The handoff threshold is controlled by `cluster-slot-migration-handoff-max-lag-bytes` (default: 1MB). +- Cancelling a task on the source node does not automatically stop the migration on the destination node. +- In `CLUSTER MIGRATION STATUS` output, the "state" field will show `completed` for successful operations. +- Tasks with empty "last_error" fields indicate no errors occurred during the migration process. + +## Key visibility during migration + +During atomic slot migration operations, certain keys may be filtered out from the following commands while importing or trimming is in progress: + +- [`KEYS`]({{< relref "/commands/keys" >}}) +- [`SCAN`]({{< relref "/commands/scan" >}}) +- [`RANDOMKEY`]({{< relref "/commands/randomkey" >}}) +- [`CLUSTER GETKEYSINSLOT`]({{< relref "/commands/cluster-getkeysinslot" >}}) +- [`DBSIZE`]({{< relref "/commands/dbsize" >}}) +- [`CLUSTER COUNTKEYSINSLOT`]({{< relref "/commands/cluster-countkeysinslot" >}}) + +The [`INFO KEYSPACE`]({{< relref "/commands/info" >}}) command will continue to reflect the actual number of keys, including those being migrated. + +## Related configuration + +- `cluster-slot-migration-max-archived-tasks`: Maximum number of archived ASM tasks kept in memory for `CLUSTER MIGRATION STATUS ALL` output (default: 32, hidden config) +- `cluster-slot-migration-handoff-max-lag-bytes`: After slot snapshot completion, if remaining replication stream size falls below this threshold, the source node pauses writes to hand off slot ownership. Higher values trigger handoff earlier but may cause longer write pauses. Lower values result in shorter write pauses but may be harder to reach with steady incoming writes (default: 1MB) +- `cluster-slot-migration-write-pause-timeout`: Maximum duration that the source node pauses writes during ASM handoff. If the destination fails to take over slots within this timeout, the source assumes migration failed and resumes writes (default: 10 seconds) +- `cluster-slot-migration-sync-buffer-drain-timeout`: Timeout for sync buffer drainage during ASM. Uses the maximum of this configurable timeout and a dynamic timeout based on slot snapshot application time (multiplied by 2 for conservatism) to handle cases where synchronization gap remains above acceptable limits (default: 60 seconds, hidden config) + +## RDB format changes + +A new auxiliary field `cluster-asm-task` has been added to the RDB format to support atomic slot migration. When an import operation begins, the master propagates an internal command through the replication stream, allowing replicas to recognize that an ASM operation is in progress. This enables replicas to trigger relevant module events so that modules can adapt their behavior, such as filtering out unowned keys from read-only requests during ASM operations. diff --git a/content/commands/info.md b/content/commands/info.md index 142334345f..2d9bcb8588 100644 --- a/content/commands/info.md +++ b/content/commands/info.md @@ -199,6 +199,9 @@ Here is the meaning of all fields in the **memory** section: * `mem_clients_slaves`: Memory used by replica clients - Starting Redis 7.0, replica buffers share memory with the replication backlog, so this field can show 0 when replicas don't trigger an increase of memory usage. * `mem_clients_normal`: Memory used by normal clients * `mem_cluster_links`: Memory used by links to peers on the cluster bus when cluster mode is enabled. +* `mem_cluster_slot_migration_output_buffer`: Memory usage of the migration client's output buffer. Redis writes incoming changes to this buffer during the migration process. +* `mem_cluster_slot_migration_input_buffer`: Memory usage of the accumulated replication stream buffer on the importing node. +* `mem_cluster_slot_migration_input_buffer_peak`: Peak accumulated repl buffer size on the importing side. * `mem_aof_buffer`: Transient memory used for AOF and AOF rewrite buffers * `mem_replication_backlog`: Memory used by replication backlog * `mem_total_replication_buffers`: Total memory consumed for replication buffers - Added in Redis 7.0. @@ -501,9 +504,16 @@ The **sentinel** section is only available in Redis Sentinel instances. It consi * `sentinel_scripts_queue_length`: The length of the queue of user scripts that are pending execution * `sentinel_simulate_failure_flags`: Flags for the `SENTINEL SIMULATE-FAILURE` command -The **cluster** section currently only contains a unique field: +The **cluster** section contains the following fields: * `cluster_enabled`: Indicate Redis cluster is enabled +* `cluster_slot_migration_active_tasks`: Number of in-progress ASM tasks. Currently, it will be 1 or 0. +* `cluster_slot_migration_active_trim_running`: Number of active trim jobs in progress and scheduled. +* `cluster_slot_migration_active_trim_current_job_keys`: Number of keys scheduled for deletion in the current trim job. +* `cluster_slot_migration_active_trim_current_job_trimmed`: Number of keys already deleted in the current trim job. +* `cluster_slot_migration_stats_active_trim_started`: Total number of trim jobs that have started since the process began. +* `cluster_slot_migration_stats_active_trim_completed`: Total number of trim jobs completed since the process began. +* `cluster_slot_migration_stats_active_trim_cancelled`: Total number of trim jobs cancelled since the process began. The **modules** section contains additional information about loaded modules if the modules provide it. The field part of property lines in this section are always prefixed with the module's name. From c73a74d5282a2b3c022af8960e9ba98c7f5e99bf Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 29 Oct 2025 06:25:58 -0700 Subject: [PATCH 2/3] Apply code review suggestions --- content/commands/cluster-countkeysinslot.md | 3 ++- content/commands/cluster-getkeysinslot.md | 3 ++- content/commands/cluster-migration.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/content/commands/cluster-countkeysinslot.md b/content/commands/cluster-countkeysinslot.md index 657d7b272b..6ed7301771 100644 --- a/content/commands/cluster-countkeysinslot.md +++ b/content/commands/cluster-countkeysinslot.md @@ -34,7 +34,8 @@ command only queries the local data set, so contacting a node that is not serving the specified hash slot will always result in a count of zero being returned. -**Note:** During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< note>}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< /note >}} ``` > CLUSTER COUNTKEYSINSLOT 7000 diff --git a/content/commands/cluster-getkeysinslot.md b/content/commands/cluster-getkeysinslot.md index 4a86db46f8..1d5eb463fb 100644 --- a/content/commands/cluster-getkeysinslot.md +++ b/content/commands/cluster-getkeysinslot.md @@ -44,7 +44,8 @@ node to another. The way the rehashing is performed is exposed in the Redis Cluster specification, or in a more simple to digest form, as an appendix of the [`CLUSTER SETSLOT`]({{< relref "/commands/cluster-setslot" >}}) command documentation. -**Note:** During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< note >}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< /note >}} ``` > CLUSTER GETKEYSINSLOT 7000 3 diff --git a/content/commands/cluster-migration.md b/content/commands/cluster-migration.md index bb2573028d..729b4f6183 100644 --- a/content/commands/cluster-migration.md +++ b/content/commands/cluster-migration.md @@ -81,7 +81,7 @@ The `CLUSTER MIGRATION` command provides atomic slot migration functionality for The subcommand specifies the operation to perform: -- `IMPORT [ ...]`: Executes on the destination master. Accepts multiple slot ranges and triggers atomic migration for the specified ranges. Returns a task ID that can be used to monitor the status of the task. +- `IMPORT [ ...]`: Executes on the destination master. Accepts multiple slot ranges and triggers atomic migration for the specified ranges. Returns a task ID that you can use to monitor the status of the task. - `CANCEL [ID | ALL]`: Cancels an ongoing migration task by its ID or cancels all tasks if `ALL` is specified. Note: Cancelling a task on the source node does not stop the migration on the destination node, which will continue retrying until it is also cancelled there. From c0bef8a5c6afddec58c821e3dba85d32e106566d Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 3 Nov 2025 12:59:57 -0800 Subject: [PATCH 3/3] Apply code review suggestions --- content/commands/cluster-countkeysinslot.md | 2 +- content/commands/cluster-getkeysinslot.md | 2 +- content/commands/cluster-migration.md | 29 +++++++-------------- content/commands/info.md | 13 +++------ 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/content/commands/cluster-countkeysinslot.md b/content/commands/cluster-countkeysinslot.md index 6ed7301771..fb680c388c 100644 --- a/content/commands/cluster-countkeysinslot.md +++ b/content/commands/cluster-countkeysinslot.md @@ -34,7 +34,7 @@ command only queries the local data set, so contacting a node that is not serving the specified hash slot will always result in a count of zero being returned. -{{< note>}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< note>}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed will be filtered out from the results. {{< /note >}} ``` diff --git a/content/commands/cluster-getkeysinslot.md b/content/commands/cluster-getkeysinslot.md index 1d5eb463fb..880c0fc527 100644 --- a/content/commands/cluster-getkeysinslot.md +++ b/content/commands/cluster-getkeysinslot.md @@ -44,7 +44,7 @@ node to another. The way the rehashing is performed is exposed in the Redis Cluster specification, or in a more simple to digest form, as an appendix of the [`CLUSTER SETSLOT`]({{< relref "/commands/cluster-setslot" >}}) command documentation. -{{< note >}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed may be filtered out from the results. +{{< note >}}During atomic slot migration operations (available since Redis 8.4.0), keys being imported or trimmed will be filtered out from the results. {{< /note >}} ``` diff --git a/content/commands/cluster-migration.md b/content/commands/cluster-migration.md index 729b4f6183..06d18f34b6 100644 --- a/content/commands/cluster-migration.md +++ b/content/commands/cluster-migration.md @@ -67,8 +67,8 @@ hidden: false linkTitle: CLUSTER MIGRATION since: 8.4.0 summary: Start, monitor, and cancel atomic slot migration tasks. -syntax_fmt: "CLUSTER MIGRATION | STATUS\_[ID\_task-id] [ALL]>" +syntax_fmt: "CLUSTER MIGRATION | STATUS\_" syntax_str: '' title: CLUSTER MIGRATION --- @@ -83,9 +83,9 @@ The subcommand specifies the operation to perform: - `IMPORT [ ...]`: Executes on the destination master. Accepts multiple slot ranges and triggers atomic migration for the specified ranges. Returns a task ID that you can use to monitor the status of the task. -- `CANCEL [ID | ALL]`: Cancels an ongoing migration task by its ID or cancels all tasks if `ALL` is specified. Note: Cancelling a task on the source node does not stop the migration on the destination node, which will continue retrying until it is also cancelled there. +- `CANCEL | ALL>`: Cancels an ongoing migration task by its ID or cancels all tasks if `ALL` is specified. Note: Cancelling a task on the source node does not stop the migration on the destination node, which will continue retrying until it is also cancelled there. -- `STATUS [ID | ALL]`: Displays the status of current and completed atomic slot migration tasks. If a specific task ID is provided, it returns detailed information for that task only. If no arguments are provided, returns status for all tasks. +- `STATUS [ID | ALL]`: Displays the status of current and completed atomic slot migration tasks. If a specific task ID is provided, it returns detailed information for that task only. If `ALL` is specified, it returns the status of all ongoing and completed tasks. @@ -136,10 +136,10 @@ For the `CANCEL` subcommand: For the `STATUS` subcommand: [Array reply](../../develop/reference/protocol-spec#arrays): a list of migration task details. Each task is represented as an array containing field-value pairs: - `id`: Task identifier -- `slots`: Slot range being migrated +- `slots`: Slot range being imported or migrated - `source`: Source node ID - `dest`: Destination node ID -- `operation`: Operation type (typically "migrate") +- `operation`: Operation type ("import" or "migrate") - `state`: Current state ("completed", "in_progress", etc.) - `last_error`: Last error message (empty if none) - `retries`: Number of retry attempts @@ -176,16 +176,13 @@ For the `STATUS` subcommand: ## Notes - The atomic slot migration feature is available starting from Redis 8.4.0. -- Migration tasks are tracked in memory and the number of archived tasks is controlled by the `cluster-slot-migration-max-archived-tasks` configuration (default: 32). -- During migration, the source node may pause writes briefly to hand off slot ownership. The duration is controlled by `cluster-slot-migration-write-pause-timeout` (default: 10 seconds). -- The handoff threshold is controlled by `cluster-slot-migration-handoff-max-lag-bytes` (default: 1MB). - Cancelling a task on the source node does not automatically stop the migration on the destination node. - In `CLUSTER MIGRATION STATUS` output, the "state" field will show `completed` for successful operations. - Tasks with empty "last_error" fields indicate no errors occurred during the migration process. ## Key visibility during migration -During atomic slot migration operations, certain keys may be filtered out from the following commands while importing or trimming is in progress: +During atomic slot migration operations, keys in unowned slotsmay be filtered out from the following commands while importing or trimming is in progress: - [`KEYS`]({{< relref "/commands/keys" >}}) - [`SCAN`]({{< relref "/commands/scan" >}}) @@ -194,15 +191,9 @@ During atomic slot migration operations, certain keys may be filtered out from t - [`DBSIZE`]({{< relref "/commands/dbsize" >}}) - [`CLUSTER COUNTKEYSINSLOT`]({{< relref "/commands/cluster-countkeysinslot" >}}) -The [`INFO KEYSPACE`]({{< relref "/commands/info" >}}) command will continue to reflect the actual number of keys, including those being migrated. +The [`INFO KEYSPACE`]({{< relref "/commands/info" >}}) command will continue to reflect the actual number of keys, including those being imported. ## Related configuration -- `cluster-slot-migration-max-archived-tasks`: Maximum number of archived ASM tasks kept in memory for `CLUSTER MIGRATION STATUS ALL` output (default: 32, hidden config) -- `cluster-slot-migration-handoff-max-lag-bytes`: After slot snapshot completion, if remaining replication stream size falls below this threshold, the source node pauses writes to hand off slot ownership. Higher values trigger handoff earlier but may cause longer write pauses. Lower values result in shorter write pauses but may be harder to reach with steady incoming writes (default: 1MB) -- `cluster-slot-migration-write-pause-timeout`: Maximum duration that the source node pauses writes during ASM handoff. If the destination fails to take over slots within this timeout, the source assumes migration failed and resumes writes (default: 10 seconds) -- `cluster-slot-migration-sync-buffer-drain-timeout`: Timeout for sync buffer drainage during ASM. Uses the maximum of this configurable timeout and a dynamic timeout based on slot snapshot application time (multiplied by 2 for conservatism) to handle cases where synchronization gap remains above acceptable limits (default: 60 seconds, hidden config) - -## RDB format changes - -A new auxiliary field `cluster-asm-task` has been added to the RDB format to support atomic slot migration. When an import operation begins, the master propagates an internal command through the replication stream, allowing replicas to recognize that an ASM operation is in progress. This enables replicas to trigger relevant module events so that modules can adapt their behavior, such as filtering out unowned keys from read-only requests during ASM operations. +- `cluster-slot-migration-handoff-max-lag-bytes`: After slot snapshot completion, if remaining replication stream size falls below this threshold, the source node pauses writes to hand off slot ownership. Higher values trigger handoff earlier but may cause longer write pauses. Lower values result in shorter write pauses but may be harder to reach with steady incoming writes (default: 1MB). +- `cluster-slot-migration-write-pause-timeout`: Maximum duration that the source node pauses writes during ASM handoff. If the destination fails to take over slots within this timeout, the source assumes migration failed and resumes writes (default: 10 seconds). diff --git a/content/commands/info.md b/content/commands/info.md index 2d9bcb8588..73ab61df7a 100644 --- a/content/commands/info.md +++ b/content/commands/info.md @@ -504,16 +504,9 @@ The **sentinel** section is only available in Redis Sentinel instances. It consi * `sentinel_scripts_queue_length`: The length of the queue of user scripts that are pending execution * `sentinel_simulate_failure_flags`: Flags for the `SENTINEL SIMULATE-FAILURE` command -The **cluster** section contains the following fields: - -* `cluster_enabled`: Indicate Redis cluster is enabled -* `cluster_slot_migration_active_tasks`: Number of in-progress ASM tasks. Currently, it will be 1 or 0. -* `cluster_slot_migration_active_trim_running`: Number of active trim jobs in progress and scheduled. -* `cluster_slot_migration_active_trim_current_job_keys`: Number of keys scheduled for deletion in the current trim job. -* `cluster_slot_migration_active_trim_current_job_trimmed`: Number of keys already deleted in the current trim job. -* `cluster_slot_migration_stats_active_trim_started`: Total number of trim jobs that have started since the process began. -* `cluster_slot_migration_stats_active_trim_completed`: Total number of trim jobs completed since the process began. -* `cluster_slot_migration_stats_active_trim_cancelled`: Total number of trim jobs cancelled since the process began. +The **cluster** section contains a single fields: + +* `cluster_enabled`: Indicates whether Redis cluster is enabled. The **modules** section contains additional information about loaded modules if the modules provide it. The field part of property lines in this section are always prefixed with the module's name.