[SERVER-6609] TTL collections can get out of sync too easily during replica set maintenance Created: 26/Jul/12  Updated: 31/Jan/20  Resolved: 26/Jul/12

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.2.0-rc0
Fix Version/s: 2.2.0-rc1

Type: Bug Priority: Major - P3
Reporter: Kevin Matulef Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-13380 Investigate changes in SERVER-45828: ... Closed
Operating System: ALL
Participants:

 Description   

If you have a secondary that you temporarily take out of the replica set (say for maintenance, index rebuilds, etc.), then when you start up that secondary in standalone mode, the TTL monitor is going to run, possibly deleting some documents while it goes. If this happens, the secondary is going to become out of sync with the primary. In most cases it will just be missing some documents that are being deleted from the primary anyway. However, if any of those missing documents are updated on the primary before they're deleted, this is going to cause replication to stall, and the only way to fix it will involve manually editing the oplog.

Proposed solution is to not start the TTL monitor if mongod is started without the --replSet option but there are documents in local.system.replset.



 Comments   
Comment by Pieter Jordaan [ 18/Sep/14 ]

Please update the documentation to reflect this case (the log message to look out for). This has bitten me in the behind, and fortunately got to this support ticket.

Comment by auto [ 30/Jul/12 ]

Author:

{u'date': u'2012-07-30T12:39:21-07:00', u'email': u'kristina@10gen.com', u'name': u'Kristina'}

Message: Comments and style fixes for SERVER-6609
Branch: master
https://github.com/mongodb/mongo/commit/048e9b2027146a90b05a21564bc0385c290b9eaa

Comment by auto [ 26/Jul/12 ]

Author:

{u'date': u'2012-07-26T13:49:05-07:00', u'email': u'kristina@10gen.com', u'name': u'Kristina'}

Message: Use startupWarningsLog SERVER-6609
Branch: master
https://github.com/mongodb/mongo/commit/29c5637d9771aacbe7ac89759e5b6585735e62ee

Comment by auto [ 26/Jul/12 ]

Author:

{u'date': u'2012-07-26T13:11:17-07:00', u'email': u'kristina@10gen.com', u'name': u'Kristina'}

Message: TTL monitor doesn't start if there's a rs config present SERVER-6609

And no replica set option given.
Branch: master
https://github.com/mongodb/mongo/commit/26b87e1fbe606b19e2e243c81f34ed10989f261d

Comment by Eliot Horowitz (Inactive) [ 26/Jul/12 ]

Your proposal seems fine.
Also put a message in the log saying its not running and why, so if someone does this intentionally the'll see.

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