定義
db.printSecondaryReplicationInfo()レプリカセットの状態を、セットの セカンダリ メンバーから見た レプリカセット の状態を形式化されたレポートで出力します。出力は
rs.printSecondaryReplicationInfo()メソッドと同じです。
互換性
このメソッドは、次の環境でホストされている配置で使用できます。
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
重要
This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
出力
Example db.printSecondaryReplicationInfo() output when run on a replica set with two secondary members:
source: m1.example.net:27002 { syncedTo: 'Mon Mar 01 2021 16:30:50 GMT-0800 (PST)', replLag: '0 secs (0 hrs) behind the primary ' } --- source: m2.example.net:27003 { syncedTo: 'Mon Mar 01 2021 16:30:50 GMT-0800 (PST)', replLag: '0 secs (0 hrs) behind the primary ' }
注意
The db.printSecondaryReplicationInfo() method run in mongosh does not return JSON. Use db.printSecondaryReplicationInfo() for manual inspection, and rs.status() in scripts.
プライマリの非アクティブ期間が members[n].secondaryDelaySecs の値より大きい場合、遅延ノードはプライマリより 0 秒遅れて表示されることがあります。
A member may show a negative time value behind the primary when db.printSecondaryReplicationInfo() is run. This is expected if db.printSecondaryReplicationInfo() is run after a secondary replicates a write that follows a period of inactivity, but before the secondary receives a heartbeat from the primary with the latest optime.
注意
セカンダリ によって報告されるラグは、クラスターの健全性を反映していない場合があります。 負の値は、セカンダリがプライマリよりも進んでいることを示すものではありません。
To obtain the most current status for your replica set, run db.printSecondaryReplicationInfo() on the primary.