Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1428

db.getReplicationInfo() gives invalid output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 1.6.0
    • 1.8.1
    • rs, Shell API
    • OS:
      node.js / npm versions:
      Additional info:
    • Not Needed
    • Iteration Yellowtail Amberjack

    Description

      When you run db.getReplicationInfo() then the output is not valid. Result is like this:
       

       

      {
        configuredLogSizeMB: 990,
        logSizeMB: 990,
        usedMB: 980.21,
        timeDiff: NaN,
        timeDiffHours: NaN,
        tFirst: 'Invalid Date',
        tLast: 'Invalid Date',
        now: 'Tue Mar 21 2023 16:03:39 GMT+0100 (Mitteleuropäische Normalzeit)'
      }
      
      

       

      timeDiff, timeDiffHours, tFirst, tLast are invalid values.

      As workaround one can call rs.status() and compare optimeDate of members. However db.getReplicationInfo() should work as intended.

      Kind Regards
      Wernfried

      Attachments

        Activity

          People

            anna.henningsen@mongodb.com Anna Henningsen
            wernfried.domscheit@sunrise.net Wernfried Domscheit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: