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

mongoexport regression: symbol type not supported in 3.0+

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • 3.5 Required
    • None
    • None

    Description

      In exploring how deprecated BSON types are handled by drivers, I discovered that mongoexport stopped handling the 'symbol' type in 3.0. It now throws an exception if "symbol" is encountered.

      In the example below, I have a collection with a single document, with key "foo" and value being the symbol type with content "hello".

      $ ~/mongodb/3.2.4/bin/mongodump --port 50672 -d test -c bson -o - | hexdump
      2016-03-15T15:18:45.535-0400    writing test.bson to stdout
      2016-03-15T15:18:45.536-0400    dumped 1 document
      0000000 25 00 00 00 07 5f 69 64 00 56 e8 5c bf ea 79 f2
      0000010 9e 1f 73 74 e1 0e 66 6f 6f 00 06 00 00 00 68 65
      0000020 6c 6c 6f 00 00
      0000025
       
      $ ~/mongodb/2.4.14/bin/mongoexport --port 50672 -d test -c bson
      connected to: 127.0.0.1:50672
      { "_id" : { "$oid" : "56e85cbfea79f29e1f7374e1" }, "foo" : "hello" }
      exported 1 records
       
      $ ~/mongodb/2.6.11/bin/mongoexport --port 50672 -d test -c bson
      connected to: 127.0.0.1:50672
      { "_id" : { "$oid" : "56e85cbfea79f29e1f7374e1" }, "foo" : "hello" }
      exported 1 records
       
      $ ~/mongodb/3.0.10/bin/mongoexport --port 50672 -d test -c bson
      2016-03-15T15:19:19.852-0400    connected to: localhost:50672
      2016-03-15T15:19:19.852-0400    Failed: conversion of BSON type 'bson.Symbol' not supported hello
       
      $ ~/mongodb/3.2.4/bin/mongodump --port 50672 -d test -c bson -o bsondump.bson
      2016-03-15T15:19:28.315-0400    writing test.bson to
      2016-03-15T15:19:28.315-0400    done dumping test.bson (1 document)
      

      N.B. The server I tested against was 2.4.14, but I also saw it with server 3.2.4.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-platform DO NOT USE - Backlog - Platform Team
              david.golden@mongodb.com David Golden
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: