[DRIVERS-823] Support $merge and $out executing on secondaries Created: 04/Feb/20 Updated: 21/Aug/23 |
|
| Status: | Implementing |
| Project: | Drivers |
| Component/s: | CRUD |
| Fix Version/s: | None |
| Type: | Epic | Priority: | Major - P3 |
| Reporter: | Backlog - Core Eng Program Management Team | Assignee: | Jeremy Mikola |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | big-rock | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||
| Server Compat: | 4.4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Quarter: | FY22Q3 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Upstream Changes Summary: | If an $out or $merge aggregate operation is delivered to a secondary node, and the operation has non-primary read preference, the operation will now work as expected. In previous versions, the operation would fail with a NotMaster category error. However, drivers have chosen not to add explicit support for this feature in their 4.4-compatible releases. There may be a way in some drivers to access this feature using a lower-level API. However, since the drivers are not changing to respect non-primary read preference for $out/$merge operations in 4.4, there should be no immediate downstream impact. |
||||||||||||||||||||||||||||||||||||||||||||||||
| Downstream Changes Summary: | As of MongoDB 5.0, drivers can support read preferences (either explicit/per-operation or inherited) for aggregations including an $out/$merge stage. Previously, such pipelines would always require a primary. Drivers should sync unified CRUD tests to mongodb/specifications@5f8f668. If possible, drivers may consider implementing DRIVERS-1958 alongside this ticket and sync to mongodb/specifications@dce2c48, which fixes an issue with the original spec tests for DRIVERS-823. The outdated "$out Aggregation Pipeline Operator" specification was also deleted. All relevant information for $out/$merge is now discussed in the CRUD spec (and parts of Server Selection). Note: |
||||||||||||||||||||||||||||||||||||||||||||||||
| Start date: | |||||||||||||||||||||||||||||||||||||||||||||||||
| Detailed Project Statuses: | Lead: Jeremy Summary: Allow an aggregation with a $merge or $out stage to respect the user-specified read preference rather than unconditionally using read preference primary. 2021-09-22:
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
Description of Linked TicketEpic Summary SummaryMotivationCast of Characters
DocumentationServer Scope Document |
| Comments |
| Comment by Jeremy Mikola [ 20/Oct/21 ] |
|
DRIVERS-1958 made a correction to the spec tests for this issue. Although DRIVERS-1958 has its own language tickets, I've amended the downstream changes for DRIVERS-823 to refer to DRIVERS-1958 and suggest that drivers do both tickets together. |
| Comment by Githook User [ 28/Sep/21 ] |
|
Author: {'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}Message: DRIVERS-823: Support $out and $merge on secondaries (#1062)
Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com> |