[JAVA-3990] Implement change stream oplog parsing code for delta oplog entries Created: 04/Feb/21  Updated: 28/Oct/23  Resolved: 22/Feb/21

Status: Closed
Project: Java Driver
Component/s: Change Streams
Affects Version/s: None
Fix Version/s: 4.3.0

Type: New Feature Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Valentin Kavalenka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to JAVA-4010 Propagate the batch size in ChangeStr... Closed
split to JAVA-4011 Prepare the change stream code for te... Closed
Server Compat: 4.7
Quarter: FY22Q2
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   

DRIVERS Ticket Description
Script Target - If you can read this text, the script has failed


 Comments   
Comment by Githook User [ 22/Feb/21 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Add the UpdateDescription.truncatedArrays field (#667)

Also in this commit:

  • Add unified change stream tests.
  • Add support for pipeline-style updateOne operations in UnifiedCrudHelper.
  • Update poc-change-streams.json from the specifications repo.
  • Update UnifiedCrudHelper to involve ChangeStreamDocumentCodec in the test process.
    This approach deserializes a ChangeStreamDocument from the incoming data
    and then serializes it in a BsonDocument. This approach works so long as
    the server responds with [] (an empty array) instead of null when specifying
    an empty UpdateDescription.truncatedArrays field.

If the server starts returning null instead of [],
we will need to modify ChangeStreamDocumentCodec so that it encodes
empty List values as BSON null. This is because UpdateDescription
represents null values as an empty List
in the UpdateDescription.getTruncatedArrays method.

If the server starts using both null and []
in different responses to report an empty UpdateDescription.truncatedArrays field,
then there no change in the ChangeStreamDocumentCodec may help us
fixing the problem, and we will have to either undo this commit,
or change the way UnifiedTest compares expectResult with the document
sent by the server.

JAVA-3990
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c58e9d33cca4fc475c845bd6cbebf80e83abd5e8

Generated at Thu Feb 08 09:00:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.