-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
Replication
-
ALL
For initial sync, in between cloning the data and building indexes, we do two oplog-application phases. It is possible to apply index-build inserts as part of these oplog-application phases. Due to idempotency issues, we separate index building from the copy of the data records, so we cannot let index builds proceed in the oplog application phases.
We must suppress index builds if we detect them in the oplog stream.
Because the index build phase does a query on the current collection's system.indexes, index builds that were suppressed in the oplog application phases will still be built in the index build phase.
Index drop commands in the oplog stream can either be suppressed or not; there will be no index to drop so the commands will be benign.
collMod commands that alter TTL index specs are in a similar situation; they should be suppressed (or ignore the index-missing error that will result).