Uploaded image for project: 'Percona Server for MongoDB'
  1. Percona Server for MongoDB
  2. PSMDB-752

optime/optimeDate on the SECONDARY is greater than on PRIMARY

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: 4.4.1-3(CVE)
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      optime/optimeDate on the SECONDARY sometimes is greater than on PRIMARY which lead to bugs like PMM-4547

      How to repeat

      1. Start Replicaset:

      mlaunch --dir ./data-4.4.1-rs --replicaset   --binarypath ./percona-server-mongodb-4.4.1-3-x86_64.glibc2.17/bin
      

      2. Connect to PRIMARY and run:

      for (var i = 1; i <= 25; i++) {    db.collectionName.insert({ x : i }); sleep(1000); }
      

      3. While loop is in progress connect to SECONDARY, run rs.status() and check values of optime/optimeDate:

      replset:SECONDARY> st=rs.status()
      ...
      replset:SECONDARY> st.members[0].stateStr
      PRIMARY
      replset:SECONDARY> st.members[1].stateStr
      SECONDARY
      
      replset:SECONDARY> st.members[0].optime.ts
      Timestamp(1603204318, 1)
      replset:SECONDARY> st.members[1].optime.ts
      Timestamp(1603204319, 1)
      
      replset:SECONDARY> st.members[0].optimeDate
      ISODate("2020-10-20T14:31:58Z")
      replset:SECONDARY> st.members[1].optimeDate
      ISODate("2020-10-20T14:31:59Z")
      

      Notice difference in times.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              sveta.smirnova Sveta Smirnova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Smart Checklist