[GODRIVER-2804] Merging ChangeStreamOptions can squash the FullDocument configuration Created: 10/Apr/23  Updated: 28/Oct/23  Resolved: 12/Apr/23

Status: Closed
Project: Go Driver
Component/s: Change Streams, Options & Configuration
Affects Version/s: None
Fix Version/s: 1.11.5, 1.11.6

Type: Bug Priority: Major - P3
Reporter: Matt Dale Assignee: Matt Dale
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to GODRIVER-2696 Allow only 0 or 1 options structs in ... Investigating
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

The options.ChangeStream options constructor currently sets a default FullDocument configuration of Default (see here). That can lead to the configuration value in some ChangeStreamOptions structs being squashed because Default appears to be a user-configured option in the default struct constructed via options.ChangeStream.

Definition of done:

  • Update the way that the default FullDocument value is set to prevent squashing that option when multiple ChangeStreamOptions are merged together.
  • Test that the FullDocument value is not overwritten when merging default ChangeStreamOptions


 Comments   
Comment by Githook User [ 02/May/23 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-2804 Fix bug that can squash FullDocument when merging ChangeStreamOptions. (#1225)

Co-authored-by: Preston Vasquez <prestonvasquez@icloud.com>
Branch: release/1.11
https://github.com/mongodb/mongo-go-driver/commit/374e369ffc63df66f1abb584505316886465574b

Comment by Githook User [ 12/Apr/23 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-2804 Fix bug that can squash FullDocument when merging ChangeStreamOptions. (#1225)

Co-authored-by: Preston Vasquez <prestonvasquez@icloud.com>
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/8800d29160334b5dfb960e7602b80d0bab0162f3

Comment by Matt Dale [ 10/Apr/23 ]

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

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