[SERVER-7186] Batched oplog application increases frequency of idempotency violations Created: 27/Sep/12  Updated: 11/Jul/16  Resolved: 23/Oct/12

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: 2.2.0
Fix Version/s: 2.2.1, 2.3.0

Type: Bug Priority: Blocker - P1
Reporter: Ian Whalen (Inactive) Assignee: Alberto Lerner
Resolution: Done Votes: 9
Labels: rsi
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod.log    
Issue Links:
Depends
Duplicate
is duplicated by SERVER-7242 Fatal error when upgrading to Mongo 2... Closed
Related
related to SERVER-6671 oplog is not strictly idempotent when... Closed
related to SERVER-3407 oplog is not idempotent for array ope... Closed
related to SERVER-4781 replica set initial sync failure when... Closed
related to SERVER-4943 $pop operator may replicate incorrectly Closed
related to SERVER-4944 $pull operator may replicate incorrectly Closed
related to SERVER-4945 $addToSet operator may replicate inco... Closed
related to SERVER-5961 $push array size constraint can cause... Closed
related to SERVER-6669 update lacking positional match creat... Closed
related to SERVER-7177 state transition for replica sets isn... Closed
related to SERVER-7551 _id Unique key violation during initi... Closed
is related to SERVER-7198 Do not go into rollback before reachi... Closed
is related to SERVER-7199 Bump minvalid when recloning ops on i... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

In 2.0.x, oplog entries are applied one at a time on each secondary. Thus, on a restart after a shutdown, only a single op can be applied twice. In 2.2.0, ops are applied in batches, so on a restart, potentially all the ops in the last batch can be reapplied. There are certain sequences of ops that violate idempotency guarantees needed to insure proper replication. In 2.2.0, if we detect such a sequence, the secondary halts replication and shuts down, unable to come back online.



 Comments   
Comment by Eric Milkie [ 05/Nov/12 ]

Hi Rotem,
I created a new JIRA issue to track this: SERVER-7551

Comment by Rotem Hermon [ 05/Nov/12 ]

This bug is not fixed yet. Upgraded to 2.2.1 and got the error again that brings down mongod. See attached log.

Comment by auto [ 17/Oct/12 ]

Author:

{u'date': u'2012-10-17T08:22:08-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed addToSet logging for an element that exists and is not at the end of the array.
Branch: v2.2
https://github.com/mongodb/mongo/commit/54217e5e20eb5d1604dba4bf8f3368903f23686b

Comment by auto [ 17/Oct/12 ]

Author:

{u'date': u'2012-10-17T08:22:08-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed addToSet logging for an element that exists and is not at the end of the array.
Branch: master
https://github.com/mongodb/mongo/commit/8f5155b8b22c7aa23940d59d4640073ebffe8dab

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-12T10:18:08-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed unittest impacted by previous commit.
Branch: v2.2
https://github.com/mongodb/mongo/commit/293764a638043a01879b7e4fe65c3210186a08a4

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-12T08:57:04-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed the case where logging addToSet would fail dollar sign verification.
Branch: v2.2
https://github.com/mongodb/mongo/commit/f7dcb90d9649d6a0ef84729f514e6a82a13199b9

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-11T16:07:14-07:00', u'name': u'Alberto Lerner', u'email': u'alerner@10gen.com'}

Message: SERVER-7186 Optimized logging of push and addToSet update modifiers.
Branch: v2.2
https://github.com/mongodb/mongo/commit/75bc746a2340ede9c97ed0d75de6d3430a18b376

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-05T12:38:04-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed the case where a no-op turned into an object replace on the secondary.
Branch: v2.2
https://github.com/mongodb/mongo/commit/60c65832ded36de7306678e09e77760248cd935e

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-04T17:49:57-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Addressed idempotency violations in update operators.
Branch: v2.2
https://github.com/mongodb/mongo/commit/57e654ee247b13a8a927e9f1f6da597c5ca33c0c

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-12T10:18:08-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed unittest impacted by previous commit.
Branch: master
https://github.com/mongodb/mongo/commit/dbaff09e6fa0be4db855125e8f1863a725ef7801

Comment by auto [ 12/Oct/12 ]

Author:

{u'date': u'2012-10-12T08:57:04-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed the case where logging addToSet would fail dollar sign verification.
Branch: master
https://github.com/mongodb/mongo/commit/9ce8c9ffc3383e131ee04dcbd5e7c07477f2f828

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-11T16:07:14-07:00', u'name': u'Alberto Lerner', u'email': u'alerner@10gen.com'}

Message: SERVER-7186 Optimized logging of push and addToSet update modifiers.
Branch: master
https://github.com/mongodb/mongo/commit/46f2d0598cb7c74fc7fd44bd038ecc3599b36f68

Comment by auto [ 06/Oct/12 ]

Author:

{u'date': u'2012-10-05T12:38:04-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Fixed the case where a no-op turned into an object replace on the secondary.
Branch: master
https://github.com/mongodb/mongo/commit/f72009cf0632379eae4f2b173fdbc4b3b47433cf

Comment by auto [ 05/Oct/12 ]

Author:

{u'date': u'2012-10-04T17:49:57-07:00', u'email': u'alerner@10gen.com', u'name': u'Alberto Lerner'}

Message: SERVER-7186 Addressed idempotency violations in update operators.
Branch: master
https://github.com/mongodb/mongo/commit/55ce76f9360e01216348e65ee5ffe4c748b9040d

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