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

Test bypassDocumentValidation error for unacknowledged writes

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: CRUD
    • Not Needed

      Summary

      Add unified spec tests that ensure a client-side error is propagated when setting "bypassDocumentValidation" on unacknowledged writes using OP_<INSERT/UPDATE/DELETE>:

      • BulkWrite
      • InsertOne
      • InsertMany
      • Update
      • Replace

      Motivation

      The CRUD specifications have a requirement for setting "bypassDocumentValidation" on unacknowledged writes using OP_<INSERT/UPDATE/DELETE>, which are still supported in 4.x. There are no unified spec tests to validate this case for the above operations. 

      This behavior is tested for "hint" and is outlined in SPEC-1540.

      Who is the affected end user?

      Any user using an legacy CRUD opcode with unacknowledged writes.

      How does this affect the end user?

      From SPEC-1540:

      provision for specifying such options and the user would have no way of knowing without the driver raising an error.

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

      If it is not currently supported by a driver, then main path.

      If the problem does occur, what are the consequences and how severe are they?

      Unknown

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      No

      Is this ticket only for tests?

      Yes

      Acceptance Criteria

      Add unified spec tests to check that an error is propagated when setting bypassDocumentValidation for versions <=4.4.24

      • BulkWrite
      • InsertOne
      • InsertMany
      • Update
      • Replace

            Assignee:
            Unassigned Unassigned
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: