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

Unclear whether read preference must be sent in RS topologies

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • Labels:
    • Needed

      https://jira.mongodb.org/browse/SPEC-1292 prohibited sending read preference in standalone topologies. The server selection spec explicitly states how read preference should be passed to mongos. However when it comes to replica sets, read preference passing is not mentioned at all - it is neither required nor prohibited (e.g. in https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#read-preference).

      matt.broadstone Suggested that read preference should not be sent when in RS topologies. When I tried that, a number of transactions tests failed. Examining these tests e.g. https://github.com/mongodb/specifications/blob/master/source/transactions/tests/read-pref.yml, they contain read preference assertions and specify they should be run on RS and sharded topologies. Hence there appears to be an implicit requirement that drivers send read preferences when in RS topologies.

            Unassigned Unassigned
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            0 Vote for this issue
            4 Start watching this issue