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

bsondump rewrite handles invalid arrays differently than legacy bsondump

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      When given an invalid bson file where an array subdocument has been transformed to read

      {"0": 1, "1":2, "9":3, "3":4}

      instead of

      {"0": 1, "1":2, "2":3, "3":4}

      when dumping this file, C++ bsondump prints

      { "_id" : ObjectId( "546513184bf6e4cb017c5309" ), "type" : "array", "ex" : [ 1, 2, undefined, undefined, undefined, undefined, undefined, undefined, undefined, 3, 4 ] }
      

      but the Go rewrite prints

      {"_id":{"$oid":"546513184bf6e4cb017c5309"},"ex":[1,2,3,4],"type":"array"}
      

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            kyle.erf Kyle Erf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: