Installed MongoDB 6.0 and using mongosh, rs.printSecondaryReplicationInfo() shows negative value on primary. The manual indicates that it would show negative value if rs.printSecondaryReplicationInfo() executed on secondary but not primary.
USWest [direct: primary] test> rs.printSecondaryReplicationInfo()
source: mon-sec-useast.xxx.com:27018
{
syncedTo: ‘Fri Aug 30 2024 17:33:37 GMT+0000 (Coordinated Universal Time)’,
replLag: '-2 secs (0 hrs) behind the primary ’
}
source: mon-sec-usnw-b.xxx.com:27018
{
syncedTo: ‘Fri Aug 30 2024 17:33:38 GMT+0000 (Coordinated Universal Time)’,
replLag: '-1 secs (0 hrs) behind the primary ’
}
source: monsec-west-or.xxx.com:27018
{
syncedTo: ‘Fri Aug 30 2024 17:33:38 GMT+0000 (Coordinated Universal Time)’,
replLag: '-1 secs (0 hrs) behind the primary ’
}