SHOW PEERS command¶
The SHOW PEERS command returns the information of all replicas of partitions in the Storage services of the current service group.
The following table describes the returned information:
| Column | Description |
|---|---|
partition_id |
The ID of the partition where the replica is located. |
host_address |
The host address of the Storage service where the replica is located. |
state |
The Raft state of the replica,including LEADER (leader replica) and FOLLOWER (follower replica). When LEADER is specified (SHOW PEERS LEADER), only the information of the state LEADER is returned, otherwise, LEADER and FOLLOWER are returned. |
term |
The Raft term of the replica. |
version |
The membership change version of the replica. |
report_time |
The time when the replica last reported its Raft state to the Meta service. |
snapshot_status |
The snapshot processing status when the Meta service receives a snapshot request. |
stable_peers |
The current stable replicas in Raft. |
unstable_peers |
The current unstable replicas in Raft. |
Syntax¶
- show_peers_command
show_peers_command ::=
'SHOW' 'PEERS' 'LEADER'?
Parameters¶
LEADER¶
The keyword LEADER is optional. When specified, only the information of the state LEADER is returned. Otherwise, LEADER and FOLLOWER are returned.
Examples¶
Each partition in Developer Edition has one replica. When the service is running normally, that replica has the LEADER state; there are no FOLLOWER rows from a multi-replica deployment. See Capabilities and limits.
Show all replicas¶
SHOW PEERS
Show only leader replicas¶
SHOW PEERS LEADER
Host addresses, terms, and report times reflect the current instance.