-
Type: Epic
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
Needed
-
Done
-
Flexible BSON Validation
-
3
-
4
-
4
-
100
-
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
- is related to
-
DRIVERS-2008 Default to lossy/replacement behavior when decoding UTF-8 in writeErrors
- Backlog