-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Replication
-
ALL
-
Two change stream events, generated from the execution of an insert command containing two documents, both having the same clusterTime value.
{"cursor": {"nextBatch": [ {"_id": {"_data": "82660AF114000000022B042C0100296E5A10043DA2BBD326BC4B7798739AC6DA4FE305463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004"}, "operationType": "insert", "clusterTime": {"$timestamp": {"t": 1711993108, "i": 2}}, "wallTime": {"$date": "2024-04-01T17:38:28.212Z"}, "fullDocument": {"_id": 1, "a": 1}, "ns": {"db": "JavaDriverTest", "coll": "com.mongodb.internal.operation.ChangeStreamOperationSpecification"}, "documentKey": {"_id": 1}}, {"_id": {"_data": "82660AF114000000022B042C01002B026E5A10043DA2BBD326BC4B7798739AC6DA4FE305463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B04000004"}, "operationType": "insert", "clusterTime": {"$timestamp": {"t": 1711993108, "i": 2}}, "wallTime": {"$date": "2024-04-01T17:38:28.212Z"}, "fullDocument": {"_id": 2, "a": 2}, "ns": {"db": "JavaDriverTest", "coll": "com.mongodb.internal.operation.ChangeStreamOperationSpecification"}, ...
This was found via an integration test of startAtOperationTime for change streams, in the Java driver. The test assumes that, at least outside of a transaction, that:
1. clusterTime values are unique
2. clusterTime values are ascending
If this assumption is false, then we will need to re-write the test. It has held true from 4.0 until now.
- is related to
-
JAVA-5397 Work around server behavioral change generating clusterTime for bulk writes
- Closed