[DOCS-7779] Rollbacks can occur on members that have never been Primary Created: 30/Apr/16  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Andrew Ryder (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

RE: https://docs.mongodb.org/manual/core/replica-set-rollbacks/

A rollback reverts write operations on a former primary when the member ...

This wording suggests that being a former Primary is a requirement. It isn't. A member that has only ever been secondary can experience a rollback, even a hidden member can be forced to perform a rollback.

Example:
Take a 5 member, all data-bearing, replica-set. Issue constant stream of writes to the Primary. Now network partition such that the Primary and one Secondary (perhaps even hidden) get isolated together. These can continue taking writes for a brief period, and the nearby Secondary will replicate these writes (this occurs regardless of WriteConcern, though those clients will not receive any confirmation when w='majority' because it can't be satisfied). When the split is detected by each group, the Primary steps down and the other group will independently elect a new Primary - which can take writes. If writes are made to the new Primary before the split is solved, then a rollback is required on the "old Primary"... but so is a rollback required on its nearby Secondary - a member which has never been Primary.

Dunno if we want to express all of this, but we need to weaken the description that a rollback occurs on a "former Primary" etc.



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Comment by Andrew Ryder (Inactive) [ 30/Apr/16 ]

The rollback contents of a secondary also do not have to match those of any other member. There is no assurance in the use case above that the co-located secondary replicated all of the writes the incumbent Primary accepted before it stepped down. Thus, it may have different contents in the rollback directory. With that said, I don't think it's possible for a secondary to have meaningfully different rollback content. If all members survive the event (not destroyed by fire/flood/pestilence/etc) then only former Primaries have meaningful rollback directories.

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