[SERVER-9087] Index changes lost during initial sync period Created: 22/Mar/13  Updated: 10/Nov/15  Resolved: 23/Mar/13

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.0
Fix Version/s: 2.4.1, 2.5.0

Type: Bug Priority: Blocker - P1
Reporter: Daniel Pasette (Inactive) Assignee: Eric Milkie
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-9059 Fatal Assertion on replication Closed
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by auto [ 22/Mar/13 ]

Author:

{u'date': u'2013-03-22T19:51:08Z', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-9087: fix initial sync ignoring updates during index creation
Branch: v2.4
https://github.com/mongodb/mongo/commit/83012756771a658c34a2b9e3581301d17fd8bb69

Comment by auto [ 22/Mar/13 ]

Author:

{u'date': u'2013-03-22T19:51:08Z', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-9087: fix initial sync ignoring updates during index creation
Branch: v2.4.1
https://github.com/mongodb/mongo/commit/2308e25ae49bc53f4790851918f2da586eaad6a0

Comment by auto [ 22/Mar/13 ]

Author:

{u'date': u'2013-03-22T19:51:08Z', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: SERVER-9087: fix initial sync ignoring updates during index creation
Branch: master
https://github.com/mongodb/mongo/commit/ae6ef38de2c5761b8e5d0e9012fa35e5dfa90b5b

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