[JAVA-2939] ChangeStream can't handle 'drop' event Created: 23/Aug/18  Updated: 28/Oct/23  Resolved: 23/Aug/18

Status: Closed
Project: Java Driver
Component/s: Change Streams
Affects Version/s: 3.8.1
Fix Version/s: 3.8.2

Type: Bug Priority: Major - P3
Reporter: Takuya Murakami Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB server 4.0.1


Issue Links:
Related
related to JAVA-2966 Support dropDatabase and rename opera... Closed
related to SERVER-35028 Add change stream notifications for c... Closed
related to SERVER-35029 Add change stream notification for da... Closed

 Description   

MongoDB server 4.0.1 sends 'drop' event in change stream.

But OperationType class can't handle 'drop' event, and throws IllegalArgumentException.

It should support 'drop' operation type. And I think it should support 'unknown' type for fail safe purpose.

 

And when the exception occurs in ChangeStreamBatchCursor.convertResults(), other events following 'drop' event (like as 'invalidate') is not handled(dropped), so they are not notified to the application.

 



 Comments   
Comment by Githook User [ 30/Aug/18 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Added Drop and Other ChangeStream operation types

JAVA-2939 JAVA-2919
Branch: 3.8.x
https://github.com/mongodb/mongo-java-driver/commit/5257d606a4ecf2b53dad1048f2d51d2719cb16ae

Comment by Ross Lawley [ 23/Aug/18 ]

Thanks tmurakam for the ticket.

This will be fixed in 3.8.2.

Comment by Githook User [ 23/Aug/18 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Added Drop and Other ChangeStream operation types

JAVA-2939 JAVA-2919
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/00dc5a916e88829c6e414d2fe98b468b132a18b7

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