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

Avoid Appending Write/Read Concern in Atlas Search Index Helper Commands

    • 3
    • Hide

      DRIVERS-2761:
      Summary

      Confirm that write/read concern are not applied to Atlas Search Index Helper commands. This is the previously expected behavior, but was previously untested. If write/read concern are applied, omit them to avoid errors from Atlas.

      References

      New specification tests and prose tests are added in: https://github.com/mongodb/specifications/commit/0b47194538aa817978fae0f77f684f6d5e62ebab
      An implementation of the tests and fix in the C++ driver are available here: https://github.com/mongodb/mongo-cxx-driver/pull/1055 with a test follow-up here: https://github.com/mongodb/mongo-cxx-driver/pull/1069

      Show
      DRIVERS-2761 : Summary Confirm that write/read concern are not applied to Atlas Search Index Helper commands. This is the previously expected behavior, but was previously untested. If write/read concern are applied, omit them to avoid errors from Atlas. References New specification tests and prose tests are added in: https://github.com/mongodb/specifications/commit/0b47194538aa817978fae0f77f684f6d5e62ebab An implementation of the tests and fix in the C++ driver are available here: https://github.com/mongodb/mongo-cxx-driver/pull/1055 with a test follow-up here: https://github.com/mongodb/mongo-cxx-driver/pull/1069
    • 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?

      Description

      An Atlas user may get the following error MongoServerError('Command does not support writeConcern's) when using our helpers, so we need to omit it when the Collection Search Index helpers are in use (they are only for Atlas).

      Unknowns

      • How do we ignore the readConcern/writeConcern value / ensure it doesn't end up in the command document?
        • Explicitly delete them in the helpersĀ 

      Acceptance Criteria

      Code Changes

      • Ignore Read/Write Concern in Atlas search index helper commands
        • Collection.listSearchIndexes
        • Collection.createSearchIndex
        • Collection.createSearchIndexes
        • Collection.dropSearchIndex
        • Collection.updateSearchIndex

      Testing Requirements

      • Sync spec tests
      • Add integration test for when atlas search index operations within a transaction

            Assignee:
            aditi.khare@mongodb.com Aditi Khare
            Reporter:
            dbeng-pm-bot PM Bot
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: