[GODRIVER-2220] Ignore read preference for $out/$merge on secondaries if any servers are pre-5.0 Created: 08/Nov/21  Updated: 15/Nov/21  Resolved: 15/Nov/21

Status: Closed
Project: Go Driver
Component/s: Server Selection
Affects Version/s: None
Fix Version/s: 1.8.0

Type: Improvement Priority: Major - P3
Reporter: PM Bot Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from DRIVERS-1969 Ignore read preference for $out/$merg... Closed
Related
is related to GODRIVER-2231 Check if readpref was overwritten in ... Backlog
Quarter: FY22Q4
Upstream Changes Summary:

DRIVERS-1969:
In mongodb/specifications@747b748, the rules were applying a read preference for aggregations using $out and $merge was changed. Previously, drivers were instructed to attempt using the read preference and only fall back to a primary if a pre-5.0 secondary was selected.

This was changed to require drivers to always disregard the read preference if there is any evidence of a pre-5.0 server. If there are either no available servers or all servers are 5.0+ (or load balanced, where we assume 5.0+), drivers can utilize the read preference.

Spec tests have not been changed, as this clarification really only changes behavior for mixed version clusters or a replica set consisting of a single pre-5.0 primary, neither of which are tested.

Documentation Changes: Not Needed

 Description   

This ticket was split from DRIVERS-1969, please see that ticket for a detailed description.



 Comments   
Comment by Githook User [ 15/Nov/21 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: GODRIVER-2220 Ignore readpref for output aggs if any servers are pre-5.0 (#804)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/a9dfbf35d2b40e235e093d1fca0e6a981210e0f1

Comment by Benji Rewis (Inactive) [ 12/Nov/21 ]

https://github.com/mongodb/mongo-go-driver/pull/804

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