I have already asked this question on StackOverflow but then I thought this forum would be more appropriate.
There’s been a really handy addition in MongoDB 5.x that allows enforcing snapshot
read concern in some read operations outside transactions and specify the timestamp at which the snapshot is taken via atClusterTime
. If the timestamp is not provided, mongo
will select it automatically and kindly return its value to the user for future reference. See:
Since MongoDB 4.x also supports read concern snapshot
- but only inside transactions with write concern majority
- I am wondering if it is also possible to obtain some information about when exactly the snapshot was taken, similarly to what 5.x is doing. I understand that I cannot explicitly specify atOperationTime
but somehow mongo
needs to select the timestamp on its own, so it seems reasonable to expect that this information should be available somewhere.