[SERVER-9096] Index build commands should be suppressed during initial sync oplog sync phases Created: 22/Mar/13  Updated: 06/Dec/22  Resolved: 02/Nov/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Replication Team
Resolution: Done Votes: 0
Labels: sync
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

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).



 Comments   
Comment by Eric Milkie [ 02/Nov/16 ]

This was fixed in a different way in 3.4 – we no longer apply operations in between fetching data and building the initial set of indexes.

Generated at Thu Feb 08 03:19:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.