-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2020-12-14, Sharding 2020-12-28
-
1
The ReadPreference::Nearest object constructed by ReshardingOplogFetcher is unused and so ShardRemote::runAggregation() ends up using its default read preference of "secondaryPreferred".
aggRequest.setUnwrappedReadPref(ReadPreferenceSetting{ReadPreference::Nearest}.toContainingBSON());
should be set on AggregationRequest constructed in ReshardingOplogFetcher::consume().