[SERVER-53478] Rename collection with dropTarget does not produce a drop changestream event Created: 22/Dec/20  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Change streams
Affects Version/s: 4.2.11
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Oren Ovadia Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: pm1950-m1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Execution
Participants:

 Description   

When opening a changestream on collection X

and running db.Y.renameCollection("X", dropTarget=true)

a rename changestream event is created from Y to X, however there is no explicit drop event associated with collection X.

 

 



 Comments   
Comment by Bernard Gorman [ 22/Feb/22 ]

As of SERVER-61889, opening a change stream with {showExpandedEvents: true} will add a new field operationDescription to the rename event. If the rename caused a collection to be dropped, this will have a field dropTarget whose value is the UUID of the dropped collection, as well as a to field describing the namespace of the dropped collection.

oren.ovadia, since in your example the change stream on collection X will receive the rename event which now contains explicit notification that collection X was dropped during the rename, is this sufficient for your use-case?

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