Donor shards currently do two writes to generate, pin, and replicate the minFetchTimestamp value. First, donor shards write a no-op oplog entry and use its opTime as the minFetchTimestamp. Second, donor shards update the config.localReshardingOperations.donor document to set the minFetchTimestamp field. This two-step process can lead to cases where the generated opTime has already lagged behind the current oldest_timestamp value and has therefore become ineligible for pinning.
repl::getNextOpTime() can be called within the WriteUnitOfWork to reserve an oplog slot. This oplog slot that can be used as the timestamp for the update to set the minFetchTimestamp field.
- depends on
-
SERVER-54610 Resharding writes to donor documents should take exclusive locks
- Closed
- is related to
-
SERVER-55679 Remove wait for w:majority from donor shards generating minFetchTimestamp in resharding
- Closed
- related to
-
SERVER-55873 Force secondaries to apply each write to config.localReshardingOperations.donor in its own batch
- Closed