Note, this only applies to the 3.7 development branch.
SERVER-32188 started to timestamp writes on secondaries from command oplog entries. It uses a `TimestampBlock` to pass context on the OperationContext's RecoveryUnit which is applied when transactions commit.
The index build uses a WriteUnitOfWork for each document resulting from the collection scan. This write gets the "commit timestamp" on the recovery unit. Foreground index builds use the recovery unit that is in context from the TimestampBlock. Background index builds use their own OperationContext. This causes background index builds to not timestamp their data writes.
Moreover, foreground index builds block replication. When replication is not progressing, the oldest_timestamp does not advance. If the oldest_timestamp is not advancing, all of the data writes that are part of the index build stay pinned. This can unnecessarily activate lookaside.