Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3693

Make it possible to add a _bsontype to function objects

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Gone away
    • None
    • None
    • BSON
    • None
    • 0
    • Not Needed

    Description

      See MONGOSH-1024 for shell context here.

      Use Case

      As a shell user
      I want to use MinKey/MaxKey the same way it worked in the legacy shell
      So that I don't accidentally send a BSON Code object instead of BSON MaxKey/MinKey over the wire

      User Impact

      For example, chunk splits can happen at the wrong boundary, or possibly collection data could be inserted in the wrong way when inserted using the shell if it contains MinKey/MaxKey.

      Dependencies

      This is so the shell can use MinKey as an alias for MinKey(), just like the legacy shell did (ditto for MaxKey).

      Unknowns

      Would the Node.js driver be willing to serialize the MinKey constructor as a BSON MinKey value, solving the issue in the driver's BSON library entirely? Would the Node.js driver be willing to move the is-function check further down the list, so that ._bsontype == 'MinKey' has a higher priority and we can add the _bsontype property ourselves on the shell end?

      Acceptance Criteria

      Implementation Requirements

      • functional reqs, potential snafus to avoid, performance targets, etc

      Testing Requirements

      • unit test, spec test sync, etc

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              anna.henningsen@mongodb.com Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: