On this page本页内容
db.printSlaveReplicationInfo()
Deprecated since version 4.4.1:自版本4.4.1以来已弃用: Use 请改用db.printSecondaryReplicationInfo() instead.db.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 输出与rs.printSlaveReplicationInfo().rs.printSlaveReplicationInfo()的输出相同。
The following is example output from the 以下是对具有两个辅助成员的副本集发出的db.printSlaveReplicationInfo() method issued on a replica set with two secondary members:db.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
The 在db.printSlaveReplicationInfo() method run in mongosh does not return JSON. mongosh中运行的db.printSlaveReplicationInfo()方法不返回JSON。Use 使用db.printSlaveReplicationInfo() for manual inspection, and rs.status() in scripts.db.printSlaveReplicationInfo()进行手动检查,并在脚本中使用rs.status()。
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秒。