On this page本页内容
rs.printSlaveReplicationInfo()
Deprecated since version 4.4.1:自版本4.4.1以来已弃用: Use 请改用rs.printSecondaryReplicationInfo()
instead.rs.printSecondaryReplicationInfo()
。
Returns a formatted report of the status of a replica set from the perspective of the secondary member of the set. 从副本集辅助成员的角度返回副本集状态的格式化报告。The output is identical to that of 输出与db.printSlaveReplicationInfo()
.db.printSlaveReplicationInfo()
的输出相同。
The following is example output from the 以下是rs.printSlaveReplicationInfo()
method issued on a replica set with two secondary members:rs.printSlaveReplicationInfo()
方法在具有两个辅助成员的副本集上发出的输出示例:
source: m1.example.net:27017 syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT) 0 secs (0 hrs) behind the primary source: m2.example.net:27017 syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT) 0 secs (0 hrs) behind the primary
A delayed member may show as 当主成员的非活动时间大于0
seconds behind the primary when the inactivity period on the primary is greater than the members[n].secondaryDelaySecs
value.members[n].secondaryDelaySecs
值时,延迟成员可能会显示为比主成员晚0
秒。
A member may show a negative time value behind the primary when 当调用rs.printSlaveReplicationInfo()
is called. rs.printSlaveReplicationInfo()
时,成员可能会在主文件后面显示负时间值。This behavior is expected if the method is called after a secondary replicates a write following a period of inactivity, but before it has received a heartbeat from the primary with its latest optime.如果在一段非活动时间后,在辅助复制写入之后,但在它收到来自主的带有最新optime的心跳信号之前调用该方法,则会出现这种行为。
The lag reported by secondaries may not be representative of cluster health. 二级报告的滞后可能不能代表集群健康状况。Negative values do not indicate that the secondary is ahead of the primary.负值并不表示辅助设备领先于主设备。
For the most up-to-date information on your replica set, it is generally advisable to run 有关副本集的最新信息,通常建议在主副本集上运行rs.printSlaveReplicationInfo()
on the primary.rs.printSlaveReplicationInfo()
。