Investigate the suspicious code in FindAndModify operations to throw in case of hist was provided for unack writes

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      FindAndModify operations contains suspicious code to throw in case of hist was provided for unack writes. Originally it was:

      Feature.HintForFindAndModifyFeature.DriverMustThrowIfNotSupported(wireVersion) || (WriteConcern != null && !WriteConcern.IsAcknowledged)

      Note OR in the condition.

      But accordingly to the CRUD spec:

      or unacknowledged writes and servers < 4.4, the driver MUST raise an error if the caller explicitly provides a value. 

      So most likely it should be AND.

      There are spec tests for this requirement that needs to be synced as well.

            Assignee:
            Unassigned
            Reporter:
            Oleksandr Poliakov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: