Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9096

Index build commands should be suppressed during initial sync oplog sync phases

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 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).

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: