[CSHARP-4801] Accessing ChangeStreamDocument.FullDocumentBeforeChange throw if pre-image was already expired Created: 21/Sep/23 Updated: 28/Oct/23 Resolved: 26/Sep/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.22.0 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Oleksandr Poliakov | Assignee: | Oleksandr Poliakov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Documentation Changes: | Not Needed | ||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||
| Description |
|
Try to access FullDocumentBeforeChange property of change stream change document throws "Unable to cast object of type 'MongoDB.Bson.BsonNull' to type 'MongoDB.Bson.BsonDocument" exception if pre-image for the change was already expired by the cluster. Steps to reproduce: 1. Set 10 seconds pre-images expiration period:
2. Store some resume token. 3. Make some changes into the collection (including document deletion). 4. Wait for some time to let cluster expire the pre-images. 5. Run change stream and try to access FullDocumentBeforeChange for the deleted document. |
| Comments |
| Comment by Githook User [ 26/Sep/23 ] |
|
Author: {'name': 'Oleksandr Poliakov', 'email': '31327136+sanych-sun@users.noreply.github.com', 'username': 'sanych-sun'}Message: |