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

Index changes lost during initial sync period

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 2.4.1, 2.5.0
    • Affects Version/s: 2.4.0
    • Component/s: Replication
    • Labels:
      None
    • ALL

      Summary

      If you have added a new secondary running v2.4.0 to a replica set (which did initial sync), then document writes applied to that secondary during the “fast index” phase will be applied but secondary index updates will be ignored. As a result, queries against that instance may miss the document updates.

      Note that this issue does not apply if you have upgraded an existing secondary.

      Impact

      On secondary nodes the data is intact and properly replicated. However the secondary indexes may be corrupt. This will affect your applications if you are doing slaveOK queries (i.e. queries against this secondary node) or if this secondary becomes the primary node of the replica set.

      Workarounds

      If you have a v2.4.0 secondary node which performed an initial sync, you need to either:

      1. Run mongod --repair on this secondary. For the repair procedure, see: http://docs.mongodb.org/manual/reference/mongod/#cmdoption-mongod--repair

      or

      2. Do a new initial sync (with v2.4.1 or v2.2) on this secondary. For the resync procedure, see: http://docs.mongodb.org/manual/administration/replica-sets/#replica-set-resync-stale-member

      Patches

      MongoDB v2.4.1 will address ONLY this problem by disabling the fast initial sync code introduced in v2.4.0.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: