-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Wire Protocol
-
None
Because of recent changes in GODRIVER-2220, if a user runs an aggregate with an output stage ($out or $merge), we will overwrite their supplied read preference with "primary" if there are any candidate servers that are < 5.0 (wire version 13).
operation.createReadPref should check if we overwrote the read preference, and if so, return no $readPreference to attach to the command. At the moment, we only check if the underlying operation was an output-aggregate and the selected server is < 5.0.
In a P5 + S4 + S5 situation where the user provided a "secondary" read preference, a $readPreference of "secondary" would be sent to a primary. While this will not cause an error, it is incorrect ("secondary" was not the effective read pref) and may mislead users of command monitoring.
- related to
-
GODRIVER-2220 Ignore read preference for $out/$merge on secondaries if any servers are pre-5.0
- Closed