[SERVER-53265] ReshardingOplogFetcher uses "secondaryPreferred" read preference instead of "nearest" Created: 08/Dec/20  Updated: 29/Oct/23  Resolved: 14/Dec/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-oplog-fetch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-12-14, Sharding 2020-12-28
Participants:
Story Points: 1

 Description   

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().



 Comments   
Comment by Githook User [ 10/Dec/20 ]

Author:

{'name': 'Blake Oler', 'email': 'blake.oler@mongodb.com', 'username': 'BlakeIsBlake'}

Message: SERVER-53265 Use "nearest" readPreference in ReshardingOplogFetcher
Branch: master
https://github.com/mongodb/mongo/commit/20ab705ce483932ad8e2f1c75c797320a21f73c5

Generated at Thu Feb 08 05:30:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.