REGION_PEERS

The REGION_PEERS table shows detailed information of a single Region node in GreptimeDB, such as whether it is a learner or leader.

REGION_PEERS - 图1NOTE

This table is not available on GreptimeCloud.

  1. USE INFORMATION_SCHEMA;
  2. DESC REGION_PEERS;

The output is as follows:

  1. +--------------+--------+------+------+---------+---------------+
  2. | Column | Type | Key | Null | Default | Semantic Type |
  3. +--------------+--------+------+------+---------+---------------+
  4. | region_id | UInt64 | | NO | | FIELD |
  5. | peer_id | UInt64 | | YES | | FIELD |
  6. | peer_addr | String | | YES | | FIELD |
  7. | is_leader | String | | YES | | FIELD |
  8. | status | String | | YES | | FIELD |
  9. | down_seconds | Int64 | | YES | | FIELD |
  10. +--------------+--------+------+------+---------+---------------+
  11. 6 rows in set (0.00 sec)

Fields in the REGION_PEERS table are described as follows:

  • region_id: The ID of the Region.
  • peer_id: The ID of the Region peer.
  • peer_addr: The address of the peer.
  • is_leader: Whether the peer is the leader.
  • status: The status of the peer, ALIVE or DOWNGRADED.
    • ALIVE: The peer is online.
    • DOWNGRADED: The Region peer is unavailable (e.g., crashed, network disconnected), or the Region peer was planned to migrate to another peer.
  • down_seconds: The duration of being offline, in seconds.