[JAVA-2892] Only send startAtOperationTime saved by driver to a resumed change stream when server version is >= 4.0 Created: 22/Jun/18  Updated: 28/Oct/23  Resolved: 26/Jun/18

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: None
Fix Version/s: 3.8.0

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


 Description   

See https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst#id20



 Comments   
Comment by Githook User [ 25/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: Restrict when startAtOperationTime is included for change streams

When resuming a change stream, the driver is required to save the
operationTime returned in the aggregate command response and send
it on subsequent aggregate commands when resuming the change stream,
until a resumeToken is available.

This commit ensures that it's only done when connected to a MongoDB 4.0
server, as per specification.

JAVA-2892
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/29d2a6ad379699a6906419837862d1372d0941aa

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