[JAVA-2966] Support dropDatabase and rename operation types for changestreams Created: 10/Sep/18  Updated: 28/Oct/23  Resolved: 18/Sep/18

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 3.8.0
Fix Version/s: 3.8.2, 3.9.0

Type: New Feature Priority: Major - P3
Reporter: Ross Lawley Assignee: Jonathan Ma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-3261 ChangeStreamDocument should support t... Closed
is related to JAVA-2939 ChangeStream can't handle 'drop' event Closed
is related to DRIVERS-504 Update ChangeStream tests for 4.1.1 "... Closed
is related to JAVA-2919 Update ChangeStream tests for 4.1.1 "... Closed

 Description   

4.0.1 introduced 3 new operation types; "drop", "dropDatabase" and "rename".

Only "drop" support has been added.



 Comments   
Comment by Githook User [ 18/Sep/18 ]

Author:

{'name': 'Jonathan', 'email': 'thejonathanma@gmail.com', 'username': 'thejonathanma'}

Message: Add support for 'dropDatabase' and 'rename' operation types

This commit adjusts the ChangeStreamDocument so that it takes in
a BsonDocument for the namespace instead of a MongoNamespace object.
This is to combat the issue of the dropDatabase operation responding
with a ChangeStreamDocument that only contains the databaseName and
not the collectionName. Tests were updated to account for this as
well. Additionally, a test for the rename operation type was added.

JAVA-2966
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/36cc12ef09569f404cc5338a16bb1d4b7bb96861

Comment by Githook User [ 18/Sep/18 ]

Author:

{'name': 'Jonathan', 'email': 'thejonathanma@gmail.com', 'username': 'thejonathanma'}

Message: Add support for 'dropDatabase' and 'rename' operation types

This commit adjusts the ChangeStreamDocument so that it takes in
a BsonDocument for the namespace instead of a MongoNamespace object.
This is to combat the issue of the dropDatabase operation responding
with a ChangeStreamDocument that only contains the databaseName and
not the collectionName. Tests were updated to account for this as
well. Additionally, a test for the rename operation type was added.

JAVA-2966
Branch: 3.8.x
https://github.com/mongodb/mongo-java-driver/commit/8e31820a2e15e18e37492c99300a5bb2bee664eb

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