Skip to content

Commit 1b2151c

Browse files
Update and add more INFO fields about replication in INFO command (#385)
It's useful when people look for it. Signed-off-by: Binbin <[email protected]> Co-authored-by: Amit Nagler <[email protected]>
1 parent d3bf87c commit 1b2151c

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

commands/info.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ acl_access_denied_channel:0
230230
# Replication
231231
role:master
232232
connected_slaves:0
233+
replicas_waiting_psync:0
233234
master_failover_state:no-failover
234235
master_replid:488d931b7e08f8e091f674ea64480165971a25f1
235236
master_replid2:0000000000000000000000000000000000000000
@@ -573,6 +574,7 @@ Here is the meaning of all fields in the **replication** section:
573574

574575
* `role`: Value is "master" if the instance is replica of no one, or "slave" if the instance is a replica of some primary instance.
575576
Note that a replica can be primary of another replica (chained replication).
577+
* `replicas_waiting_psync`: The number of replicas waiting for partial resynchronization during the dual-channel replication. Added in Valkey 8.0.
576578
* `master_failover_state`: The state of an ongoing failover, if any.
577579
* `master_replid`: The replication ID of the Valkey server.
578580
* `master_replid2`: The secondary replication ID, used for PSYNC after a failover.
@@ -595,6 +597,8 @@ If the instance is a replica, these additional fields are provided:
595597
* `master_sync_in_progress`: Indicate the primary is syncing to the replica
596598
* `slave_read_repl_offset`: The read replication offset of the replica instance.
597599
* `slave_repl_offset`: The replication offset of the replica instance
600+
* `replicas_repl_buffer_size`: Currently accumulated replication stream data in bytes during the dual-channel replication. Added in Valkey 8.0.
601+
* `replicas_repl_buffer_peak`: Peak number of bytes accumulated replication stream data during the lifetime of this instance. Added in Valkey 8.0.
598602
* `slave_priority`: The priority of the instance as a candidate for failover
599603
* `slave_read_only`: Flag indicating if the replica is read-only
600604
* `replica_announced`: Flag indicating if the replica is announced by Sentinel.
@@ -627,7 +631,21 @@ If the server is configured with the `min-replicas-to-write` directive, an addit
627631

628632
For each replica, the following line is added:
629633

630-
* `slaveXXX`: id, IP address, port, state, offset, lag
634+
* `slaveXXX:ip=xxx,port=xxx,state=xxx,offset=xxx,lag=xxx,type=xxx`
635+
636+
`state` represents the state of the replica client and can be one of the following strings.
637+
638+
* `wait_bgsave`: The replica is waiting for the primary to generate the RDB file.
639+
* `send_bulk`: Primary is sending the RDB file to replica.
640+
* `online`: RDB file transmitted, sending just updates.
641+
* `rdb_transmitted`: RDB file transmitted, this state is used for the rdb-channel during dual-channel replication when the RDB transfer is complete but the replica has not yet established its main connection. Added in Valkey 9.1.
642+
* `bg_transfer`: Main channel of a replica during dual-channel replication. Changes to `online` once sync is complete. Added in Valkey 8.0.
643+
644+
`type` added in Valkey 8.0, represents the type of the replica client and can be one of the following strings.
645+
646+
* `replica`: Normal replica client.
647+
* `main-channel`: Main channel of a replica which uses dual-channel replication. Once dual channel replication is complete, the type will become `replica`.
648+
* `rdb-channel`: RDB channel of a replica which uses dual-channel replication. Once dual channel replication is complete, the replica client will disconnect.
631649

632650
Here is the meaning of all fields in the **cpu** section:
633651

wordlist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ race:usa
675675
radix
676676
rc[0-9]*
677677
RC[0-9]+
678+
rdb-channel
678679
rdb-preamble
679680
RDB-saving
680681
rdd

0 commit comments

Comments
 (0)