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

Remove isUint8Array check from ObjectId serialization and remove set calls for common primary key cases

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • bson-6.4.0
    • Affects Version/s: None
    • Component/s: None
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      As a Node.js engineer working on a BSON library after ver 5
      I want to improve BSON logic based on the knowledge that only BSON types from the current library are permitted into the serializer
      So that I can reduce the checks made on inputs

      User Impact

      • None

      Dependencies

      • None

      Unknowns

      • Can we avoid invoking the .id getter and access "buffer" directly?

      Acceptance Criteria

      Implementation Requirements

      • Remove isUint8Array check from serializeObjectId
      • See unknown
      • copy the 12 bytes manually instead of calling .set()
        • Do the same for 16 byte binaries (uuid)

      Testing Requirements

      • None

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: