[GODRIVER-666] Write concern should not be encoded in aggregate unless $out is specified Created: 30/Nov/18  Updated: 28/Oct/23  Resolved: 04/Dec/18

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.1.0

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Running an aggregate without a $out stage on a collection that has a non-nil write concern yields the following error:

command.Error{Code:72, Message:"Command does not support writeConcern", Labels:[]string(nil), Name:"InvalidOptions"}

Change command/aggregate.go to only include write concern if $out is specified.



 Comments   
Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: Modify aggregate to only encode a write concern if $out is specified.

GODRIVER-666

Change-Id: Icfbb86359ce3e3a2b5678a75c3727993053ccdcc
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/a826473d0283ba7bf6da66a7ec1ead59e3047462

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