db.printSlaveReplicationInfo()
On this page本页内容
Definition定义
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.从副本集的secondary成员的角度返回副本集状态的格式化报告。The output is identical to that of输出与rs.printSlaveReplicationInfo()
.rs.printSlaveReplicationInfo()
的输出相同。
Output输出
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
秒。