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

Flexible BSON Validation

    • Type: Icon: Epic Epic
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Needed
    • 3
    • 4
    • 4
    • 100
    • Hide

      Engineer: Grace Chong/Bailey Pearson

      2021-12-13: Implementation and reviews are complete, will be complete with the next minor release.


      2021-11-29: Target end date remains 12/10/21

      • Bailey who joined the team is working on the last task to complete the project.

      2021-10-29: Setting end date to 2021-12-10

      • Will require an additional week to complete, project was started by Grace Chong, who is a rotational new grad that required additional training to ramp up.
      Show
      Engineer: Grace Chong/Bailey Pearson 2021-12-13: Implementation and reviews are complete, will be complete with the next minor release. 2021-11-29: Target end date remains 12/10/21 Bailey who joined the team is working on the last task to complete the project. 2021-10-29: Setting end date to 2021-12-10 Will require an additional week to complete, project was started by Grace Chong, who is a rotational new grad that required additional training to ramp up.

      Summary

      Enable users of the BSON library and the node driver to opt into replacement behavior instead of strict UTF-8 validation. Goals:

      • Users of the BSON library and of the node driver should be able to specify fields that they do or do not wish to be strictly validated
      • The node driver should separate user data parsing from the rest of server response parsing so that non-user data is loosely validated, and, in particular, so that meaningful error messages from the server can still be conveyed to the end user even if the server response bson contains some invalid UTF-8 characters

      Motivation

      Who is the affected end user?

      Users of the BSON library and users of the node driver.

      How does this affect the end user?

      • Strict UTF-8 validation slows down the performance of BSON decoding functionality, both when using the BSON library directly and when the node driver decodes server responses for user commands
      • Strict UTF-8 validation prevents the driver from being able to convey meaningful information from the server to the end user if the server response contains any invalid UTF-8 characters, causing user confusion in the case of certain server errors

      How likely is it that this problem or use case will occur?

      Server responses are known to contain invalid UTF-8 in certain cases.

      The performance degradation has already been noticed by users of the 4.x driver compared to the 3.x driver (because the 3.x driver used a version of BSON that did not have this validation).

      If the problem does occur, what are the consequences and how severe are they?

      Inability to determine source of error in one case; performance degradation of ~10% in the other.

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      No

      Is this ticket only for tests?

      No

      Cast of Characters

      Engineering Lead:
      Document Author:
      POCers:
      Product Owner:
      Program Manager:
      Stakeholders:

      Channels & Docs

      Slack Channel - N/A

      Scope Document - N/A

      Technical Design Document

            Assignee:
            Unassigned Unassigned
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 weeks, 1 day