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

mongoexport/import break BSONTimestamps

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc0
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: mongoimport
    • None

      Somewhere between exporting and importing a Timestamp gets turned into a

      {"t": <time>, "i": <inc>}

      document.

      dgottlieb@keylime:~/10gen/mms/server$ mongo
      MongoDB shell version: 2.1.0
      connecting to: test
      > db.export.insert({t: Timestamp(0, 8)})
      > db.export.find()
      { "_id" : ObjectId("4f7f93e94057ae51e71576eb"), "t" : Timestamp(0, 8) }
      > 
      bye
      dgottlieb@keylime:~/10gen/mms/server$ mongoexport -d test -c export | mongoimport -d test -c import
      connected to: 127.0.0.1
      connected to: 127.0.0.1
      exported 1 records
      Fri Apr  6 21:10:17 imported 1 objects
      dgottlieb@keylime:~/10gen/mms/server$ mongo
      MongoDB shell version: 2.1.0
      connecting to: test
      > db.import.find()
      { "_id" : ObjectId("4f7f93e94057ae51e71576eb"), "t" : { "t" : 0, "i" : 8 } }
      > db.export.find()
      { "_id" : ObjectId("4f7f93e94057ae51e71576eb"), "t" : Timestamp(0, 8) }
      

            Assignee:
            mikeo@mongodb.com Michael O'Brien
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: