[SERVER-49177] [stepdown] Make "start blocking" write's onAbort handler call TenantMigrationAccessBlocker::rollBackStartBlocking Created: 29/Jun/20  Updated: 29/Oct/23  Resolved: 09/Oct/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-A
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-49178 [stepdown] Make "commit" and "abort" ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-10-05, Sharding 2020-10-19
Participants:
Linked BF Score: 30

 Description   

Update rollback() method of the TenantMigrationDonorHandler class described in SERVER-49178 to call rollBackStartBlocking if the _state is “start blocking”, and move mtab->startBlockingWrites so that it is called after the "start blocking" update's WUOW is created.

This way:

  •  if the "start blocking" update commits, then if the node steps down and the new primary does not have the "start blocking" update (and therefore tries to do the "start blocking" update again), the old primary would have had to go through rollback
  • if the "start blocking" update aborts, then the mtab->startBlockingWrites will get undone through the rollback() handler

Note that though the rollback() handler can run at an arbitrary point after the WUOW aborts, any locks held in the WUOW will have their lifetime extended until all the rollback() handlers have run. This means if the write aborted due to stepdown, the stepdown will block until the write's rollback() handler runs.



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

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-49177 Make "start blocking" write's onAbort handler call TenantMigrationAccessBlocker::rollBackStartBlocking
Branch: master
https://github.com/mongodb/mongo/commit/7c7f722ff4580dd682bc1fa2451ddf600929cc71

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