Hello,
I have a question regarding the behavior of startAtOperationTime
. According to the documentation startAtOperationTime
only works if you provide a timestamp within the time range of the oplog. The behavior I experience is different. Here’s how I create a timestamp and pass it to the change stream using the official rust driver.
let start_time = Timestamp { time: 0, increment: 0 };
let opts = ChangeStreamOptions::builder().start_at_operation_time(Some(start_time)).build();
And here’s part of the output of rs.printReplicationInfo()
oplog first event time
'Sun Oct 22 2023 16:52:07 GMT+0300 (Eastern European Summer Time)'
Clearly the provided timestamp is outside the oplog time window, yet the stream starts without issues from the oldest entry in the oplog. This link is from Stack Overflow showing that other people experience the same thing using the java driver, which makes me think it is not a driver specific problem.
The described behavior suits me right, but considering it contradicts the documentation, I would like to know if it is intentional and I can rely on it, or it might be changed in future releases.
Regards,
Pavel