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

Should we parse wtimeoutMS when w <= 1?

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Read and Write Concern
    • None
    • Needed

      The wtimeoutMS as a valid number spec test considers that a URI with wtimeoutMS and no w value (default = 1) to be valid. Since wtimeoutMS only pertains to replication, I would consider that specifying it when w is <= 1 is a logical error.

      I noticed this while looking at aefdd2b for CDRIVER-2621. libmongoc previously ignored wtimeoutMS in that case, which seemed more correct.

      The only benefit I can see with the current behavior is that wtimeoutMS will always be parsed and ensure that the driver creates a non-empty write concern. In the event that the cluster has a default write concern, this will ensure that the client's write concern is sent and applied (even if wtimeoutMS has no effect).

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: