Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2761

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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Index Management
    • None
    • Needed
    • Hide

      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
      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
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4775 Backlog
      CXX-2785 Fixed 3.9.0
      CSHARP-4839 Done 2.27.0
      GODRIVER-3043 Fixed 2.0.0
      JAVA-5238 Fixed 5.0.0
      NODE-5745 Fixed 6.6.0
      MOTOR-1211 Duplicate
      PYTHON-4037 Fixed 4.7
      PHPLIB-1307 Done 1.17.1
      RUBY-3351 Backlog
      RUST-1799 Backlog
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4775 Backlog CXX-2785 Fixed 3.9.0 CSHARP-4839 Done 2.27.0 GODRIVER-3043 Fixed 2.0.0 JAVA-5238 Fixed 5.0.0 NODE-5745 Fixed 6.6.0 MOTOR-1211 Duplicate PYTHON-4037 Fixed 4.7 PHPLIB-1307 Done 1.17.1 RUBY-3351 Backlog RUST-1799 Backlog

      Summary

      In the ticket DRIVERS-2637, Atlas Search Index helper methods were introduced.

      Later, when some drivers had already implemented the spec, the specification was updated to reflect that write concern is not relevant. From the spec:

      These commands internally proxy the search index management commands to a separate process that runs alongside an Atlas cluster. As such, read concern and write concern are not relevant for the search index management commands.

      However, some of the drivers might still append write or read concerns to the commands.

      Currently, the existing prose tests don't have a specific case to ensure that write/read concerns are not included in the index search commands. This means that some drivers may not be aware that the server will produce an error 

      (InvalidOptions) with the message 'Command does not support writeConcern'

       if write/read concern is included. This can lead to errors when users attempt to create Atlas Search Indexes.

      Motivation

      Who is the affected end user?

      The affected end user is any developer or administrator using MongoDB drivers to interact with Atlas Search.

      How does this affect the end user?

      This affects the end users by potentially causing errors during the creation of Atlas Search Indexes if write/read concerns are inadvertently appended to the commands. Users might be confused or annoyed by these errors.

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

      The likelihood of this problem occurring is moderate.

      Is this issue urgent?

      This issue is moderately urgent as it can lead to errors for users trying to create Atlas Search Indexes.

      Is this ticket only for tests?

      This ticket primarily addresses a functional improvement by ensuring that write/read concerns are not appended to Atlas Search Index helper commands. 

      Acceptance Criteria

      1. When executing Atlas Search Index helper commands, write/read concern must not be appended.
      1. Add a test case to verify that write/read concerns are not appended to Atlas Search Index commands.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Kevin Albertson Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: