[DRIVERS-2231] ChangeStream Spec: fullDocument field in ChangeStreamOptions should be an optional to handle "default" case. Created: 01/Jul/19  Updated: 09/Sep/22  Resolved: 09/Sep/22

Status: Closed
Project: Drivers
Component/s: Change Streams
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Benji Rewis (Inactive) Assignee: Nataly Carbonell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before DRIVERS-2261 Remove $$unsetOrMatches in poc-change... Backlog
has to be done before DRIVERS-1915 Change streams support for user-facin... Closed
has to be done before DRIVERS-1995 Do not error when parsing change stre... Implementing
Issue split
split to PHPLIB-808 Leave fullDocument change stream opti... Closed
split to CDRIVER-4305 ChangeStream Spec: fullDocument field... Closed
split to CSHARP-4093 ChangeStream Spec: fullDocument field... Closed
split to CXX-2462 ChangeStream Spec: fullDocument field... Closed
split to GODRIVER-2329 ChangeStream Spec: fullDocument field... Closed
split to JAVA-4526 ChangeStream Spec: fullDocument field... Closed
split to MOTOR-905 ChangeStream Spec: fullDocument field... Closed
split to NODE-4069 ChangeStream Spec: fullDocument field... Closed
split to PYTHON-3163 ChangeStream Spec: fullDocument field... Closed
split to RUBY-2920 ChangeStream Spec: fullDocument field... Closed
split to RUST-1214 ChangeStream Spec: fullDocument field... Closed
Problem/Incident
Related
related to PYTHON-1905 Only send fullDocument field with $ch... Closed
related to RUBY-1940 Stop sending fullDocument: "default" ... Closed
Driver Changes: Needed
Downstream Changes Summary:

Currently, the ChangeStream spec defines the fullDocument field in ChangeStreamOptions as a String that defaults to the string literal "default". As of server version 3.6, sending "default" and sending no fullDocument field have identical behavior, so fullDocument should be defined as an Optional<String> to avoid using the "default" string literal.

Drivers should sync legacy change streams tests to mongodb/specifications@31edce6 and legacy retryable reads tests to mongodb/specifications@006a4f1 .

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4305 Done 1.22.0, 1.22.0-beta0
CXX-2462 Fixed 3.7.0
CSHARP-4093 Duplicate
GODRIVER-2329 Done
JAVA-4526 Done
NODE-4069 Fixed 4.5.0
MOTOR-905 Duplicate
PYTHON-3163 Duplicate
PHPLIB-808 Fixed 1.13.0-beta1, 1.13.0
RUBY-2920 Fixed 2.18.0
RUST-1214 Works as Designed
SWIFT-1512 Works as Designed

 Description   

Currently, the ChangeStream spec defines the fullDocument field in ChangeStreamOptions as a String that defaults to the string literal "default". As of server version 3.6, sending "default" and sending no fullDocument field have identical behavior, so fullDocument should be defined as an Optional<String> to avoid using the "default" string literal.



 Comments   
Comment by Githook User [ 13/Apr/22 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: DRIVERS-1915: Change stream support for point-in-time pre and post-images (#1176)

  • DRIVERS-1915: Change stream support for point-in-time pre and post-images
  • Note "default" value for fullDocument

Per DRIVERS-2231, drivers no longer send this value, but it is technically accepted (like "off" for fullDocumentBeforeChange).

Comment by Githook User [ 17/Jul/19 ]

Author:

{'name': 'Prashant Mital', 'username': 'prashantmital', 'email': '5883388+prashantmital@users.noreply.github.com'}

Message: SPEC-1350 Remove fullDocument field from retryableReads changeStreams spec tests (#610)
Branch: master
https://github.com/mongodb/specifications/commit/006a4f1a363e3d03f7169b85e0b5c53b61946d83

Comment by Prashant Mital (Inactive) [ 17/Jul/19 ]

Follow up PR: https://github.com/mongodb/specifications/pull/610

Comment by Githook User [ 16/Jul/19 ]

Author:

{'name': 'Nataly Carbonell', 'email': 'natcarbonell97@gmail.com', 'username': 'ncarbon'}

Message: SPEC-1350 Make fullDocument field in ChangeStreamOptions an optional string to handle the "default" case (#600)
Branch: master
https://github.com/mongodb/specifications/commit/31edce69d0fed2151a08c66204b7b60afcd6ab9b

Comment by Jeremy Mikola [ 08/Jul/19 ]

https://github.com/mongodb/specifications/pull/600

Comment by Jeremy Mikola [ 08/Jul/19 ]

As of server version 3.6

Just to confirm, server versions since 3.6.0 have historically allowed the fullDocument option within the $changeStream pipeline operator to be omitted? Just want to double check before reviewing mongodb/specifications#600 to verify that this change has absolutely no impact on the server (given that change streams were only introduced in 3.6.0).

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