[DOCS-11987] Docs for SERVER-35731: Prevent a repaired node from re-joining a replica set Created: 22/Aug/18  Updated: 13/Nov/23  Resolved: 09/Oct/18

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.3, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-35731 Prevent a repaired node from re-joini... Closed
Participants:
Days since reply: 5 years, 18 weeks, 1 day ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

----------------------------

Original Description

Description:

When a mongod is started with --repair and data or metadata is modified by the operation, the instance will be unable to rejoin its original replica set without a full resync. The only way to add the instance back to a replica set would be to delete the local.system.replset collection or wipe the data directory entirely.

Additionally, if a repair operation fails to complete for any reason, the instance will not be able to start again without the --repair option.

Engineering Ticket Description:

When MongoDB is started with --repair, the repair process will attempt to salvage data at the expense of potential data loss so that MongoDB can be started normally.

If a user is unaware they have lost data, they may attempt to add the node back to its original replica set. In the worst-case scenario, this node will become primary and data will appear to go missing.

There are currently no measures in place to prevent a secondary with data modified offline from re-joining its original replica set (even without repair).

Solution: If repair modifies collections (not indexes), repair will add a top-level field "repaired: true" to the local.system.replset configuration document. This will invalidate the document and prevent the node from re-joining as a member of the replica set. When the server starts up again normally, a warning will be printed with instructions for performing a re-sync.

----------------------------

Description

Scope of changes (files that need work and how much)

Impact to other docs outside of this product

MVP (work and date?)

Resources (e.g. Scope Docs, Invision)



 Comments   
Comment by Githook User [ 09/Oct/18 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabellasiu@Isabellas-MacBook.local'}

Message: DOCS-11987 repaired node can't rejoin replica set
Branch: master
https://github.com/mongodb/docs/commit/059076bd9790251907e7e1f8bfc57a99991ddb41

Generated at Thu Feb 08 08:04:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.