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

Ensure fully guaranteed roundtrip of data through mongoexport/mongoimport via JSON

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: Legacy C++ Implementation
    • Fix Version/s: 3.1.3
    • Component/s: mongoexport, mongoimport
    • Labels:
      None

      Description

      it's kind of bad that you cannot do mongoexport / mongoimport and get things identical

      foo:PRIMARY> db.accounts.insert(

      {a: Timestamp()}

      )
      foo:PRIMARY> db.accounts.find()
      { "_id" : ObjectId("4d825eeef7e844daacb16e96"), "a" :

      { "t" : 1300389614000, "i" : 1 }

      }
      here I'm assuming the timestamp has type "timestamp" in the bson.

      $ ./mongoexport -d testdb -c accounts | ./mongoimport -d testdb -c accounts2

      foo:PRIMARY> db.accounts2.find()
      { "_id" : ObjectId("4d825eeef7e844daacb16e96"), "a" :

      { "t" : NumberLong("1300389614000"), "i" : 1 }

      }
      here I'm assuming the timestamp is just an object in the bson..

      For all native bson types, we should make sure they can be exported/imported in JSON reliably.
      It seems issue exists with at least: timestamp, date, code, ..

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shraya.ramani Shraya Ramani
              Reporter:
              antoine Antoine Girbal
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: