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

enableUtf8Validation on cursors broken in 6.8.0

    • 0
    • Not Needed
    • 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?

      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

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: