Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3540

Timestamp(0,0) is not replicated properly in mongorestore and mongoimport

    • TAR 2024-09-02, TAR 2024-09-16
    • 3
    • Tools and Replicator
    • 30

      Problem Statement/Rationale

      The server replaces Timestamp(0,0) with the current time when clients insert Timestamp(0,0). Updates and inserts, however, can actually store Timestamp(0,0).

      Due to the discrepancy between the way Timestamp(0,0) is handled in updates and inserts, mongorestore will replace Timestamp(0,0) values with the current time.

      Steps to Reproduce

      • On the source cluster, insert a timestamp value and then update it to Timestamp(0,0)
      • Use mongodump to take a dump of the source cluster
      • Use mongorestore to restore the dump to the destination cluster
      • Check the destination cluster and verify that Timestamp(0,0) was not correctly migrated

      Expected Results

      Timestamp(0,0) is properly restored

      Actual Results

      Timestamp(0,0) is restored as the current time

       

      Acceptance criteria

      Use the change from the server to fix this for 5.0+, and do nothing for earlier. File and get a DOCSP ticket prioritized to call it out as a limitation for mongorestore on server versions 4.4 and earlier.

            Assignee:
            Unassigned Unassigned
            Reporter:
            johnny.dubois@mongodb.com Johnny DuBois
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: