rs.printSlaveReplicationInfo()

在本页面

Definition

Output

以下是对具有两个辅助成员的副本集发出的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

当主要对象的闲置时间大于members[n].slaveDelay值时,delayed member可能显示为比主要对象晚0秒。

调用rs.printSlaveReplicationInfo()时,成员可能会在主要对象后面显示一个负时间值。如果在辅助设备在一段时间不活动之后但在其最近的 optime 接收到来自主设备的心跳之前,在辅助设备复制写操作之后调用该方法,则会出现此行为。

Note

次要人员报告的延迟可能无法代表群集运行状况。负值并不表示次级节点在初级节点之前。

有关您的副本集的最新信息,通常建议在主数据库上运行rs.printSlaveReplicationInfo()

首页