-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Workload Scheduling
-
Fully Compatible
-
ALL
-
v8.0, v7.3, v7.0
-
-
Workload Scheduling 2024-08-05
-
0
When running an exhaust query in the shell, we call the built-in find rather than runCommand: https://github.com/10gen/mongo/blob/3639fdb2758f07a85958fcf28e24cf0056c1d8e8/src/mongo/shell/query.js#L130-L156
Since find has read preference as an explicit argument, we get the read preference (if any) from the command object and pass it to find, which internally ends up adding it to the op message, resulting in a duplicate read preference.