-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
Upon inserting a document with { $setOnInsert
{ 'a' : Timestamp(0,0) }, the timestamp is overwritten to reflect the operational timestamp here. However, an update with
{upsert: true}that specifies $setOnInsert
{ 'a' : Timestamp(0,0) }preserves the value Timestamp(0,0) in the upserted document. This is inconsistent behavior between two types of inserts.
I would recommend unifying this behavior.
This ticket is relevant for the updateOneWithoutShardKey project as upserts are converted to inserts on mongos. So, while the user behavior would've originally expected Timestamp(0,0) to remain, it now reflects the operational timestamp.
- related to
-
SERVER-86474 $_internalApplyOplogUpdate with $set: { foo: Timestamp(0, 0) } is not replicated correctly
- Closed