10.53 V$SHARD_REPLICATION_UNIT

V$SHARD_REPLICATION_UNIT displays information about replication units (RUs) that are present in a shard.

This view displays one row for each RU.

Column Datatype Description

SHARD_ID

NUMBER

Shard database identifier

RU_ID

NUMBER

Replication unit (RU) identifier

LEADER_ID

NUMBER

Leader's SHARD_ID for the corresponding RU

ROLE

NUMBER

Role of the shard for the RU:

  • 1 - The shard is the leader

  • 2 - The shard is the follower

  • 3 - The shard is a candidate for leader election

TERM

NUMBER

Term number

This value is incremented each time a new leader is elected.

COMMITIDX

NUMBER

LCRs with a log index of COMMITIDX or lower have consensus

OLDAPPIDX

NUMBER

Oldest log index that an apply process group may need

APPLYLWMIDX

NUMBER

Position of apply low watermark on the follower

ONDISKIDX

NUMBER

Persisted log index

FLAGS

NUMBER

State of the shard with respect to the RU:

  • 0x00000001 - PRE-SHUTDOWN

  • 0x00000002 - IN MOVE

  • 0x00000004 - IN COPY

  • 0x00000008 - LEADER NOT RECOVERED

  • 0x00000010 - OPEN LEADER

  • 0x00000020 - ELECTION REQUEST

  • 0x00000040 - AFTER VOTE

  • 0x00000080 - DRAIN KNLBM LEADER TO FOLLOWER

    When a shard becomes follower, the knlb buffer should be drained.

  • 0x00000100 - BARRIER DDL SUSPEND

  • 0x00000200 - BARRIER DDL RESUME

  • 0x00000400 - RESUME NOTIFICATION

  • 0x00000800 - RU LOADED

  • 0x00001000 - SUSPEND APPLY KNLB ENQ

  • 0x00002000 - NETWORK RECEIVER RAISED

  • 0x00004000 - ERROR CHECK HINT

    Set by foreground using DBMS_APPLY_ADM.DELETE_ALL_ERRORS. When this flag is set, the network receiver can immediately check the number of apply errors without waiting for a timeout.

  • 0x00008000 - SUSPEND CHECK HINT

    Set by foreground using DBMS_APPLY_ADM.DELETE_ALL_ERRORS. When this flag is set, the network receiver can immediately check the apply suspend status without waiting for a timeout.

  • 0x00010000 - ERRORS

    When this flag is set, the RU has active errors. The flag will be unset upon successful recovery.

  • 0x00020000 - GP AUTO RESTART

  • 0x00040000 - FOLLOWER CATCHUP

  • 0x00100000 - DELETE LOG STOP ENQ

  • 0x00200000 - OPTIMISE APPLY STOP DELETE LOG TAIL

ROLE_CHANGED_TIME

TIMESTAMP(6)

Time at which the role for the RU in the shard last changed

RECOVERY_TIME

TIMESTAMP(6)

Amount of time taken for recovery

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

Note:

This view is available starting with Oracle Database 23ai.