-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: 6.8.0
import { MongoClient } from 'mongodb' const client = await MongoClient.connect(process.env.CLUSTER); const db = client.db("test"); const coll = db.collection("invalidutf8"); for await (const doc of coll.find({}, { enableUtf8Validation: false })); await client.close();
works on 6.7.0, broken on 6.8.0. Data inserted using inserted.py from https://gist.github.com/addaleax/a892522a21ca87d206d991a0b97b4c6c.
Use Case
As a... driver user
I want... to be able to read documents that contain invalid UTF-8
So that... I can recover from that invalid data
User Experience
enableUtf8Validation should work like it did in previous verisons. This is particularly relevant considering the impact of NODE-6349.
Dependencies
N/A
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Is there an opportunity to improve existing documentation on this subject?
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
- if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward
- related to
-
NODE-6349 Node v22.7.0 can produce invalid UTF-8 strings that can result in malformed BSON
- Closed