Issue description doc: https://docs.google.com/document/d/1jXByNwGhMMGBBnOJcO_jmUShFO71oO9cT1EBinbF9oQ/edit
MongoDB's insert command has a quirk where, if the record being inserted has any 0-valued timestamps ("Timestamp(0,0)"), these timestamps are replaced with the current time (as described in MongoDB's docs here).
MongoDB's update, findAndModify, and bulkWrite commands also have a similar quirk where, in some cases, 0-valued timestamps will be replaced with the current time.
At present, there is no easy way to insert/update/upsert documents using the aforementioned commands without triggering this "replace Timestamp(0,0) with current time" behavior.
This poses a problem for mongosync, because mongosync needs an efficient way to copy a collection from a source cluster to a destination cluster as-is using the aforementioned commands (and it also needs an efficient way to keep the destination up-to-date by periodically replaying updates from the source's oplog as-is).
This issue also affects mongorestore and mongoimport.
The goal of this task is to see if we can provide a way for external tools to insert/update/upsert documents without triggering the "replace Timestamp(0,0) with current time" behavior.
- depends on
-
SERVER-86474 $_internalApplyOplogUpdate with $set: { foo: Timestamp(0, 0) } is not replicated correctly
- Closed
-
SERVER-89034 Always preserve 0-valued timestamps when migrating documents, add tests
- Closed
- is depended on by
-
TOOLS-3540 Timestamp(0,0) is not replicated properly in mongorestore and mongoimport
- Waiting (Blocked)