[SERVER-85217] Reduce movePrimary critical section time in case of failure before commit phase Created: 15/Jan/24  Updated: 30/Jan/24  Resolved: 30/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Silvia Surroca Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: CAR Team 2024-01-22, CAR Team 2024-02-05
Participants:

 Description   

The MovePrimaryCoordinator, in case of error during cloning, unblocks the critical section right after dropping the orphaned data on the recipient.
However, releasing the critical section before is also valid and would decrease the read/write blocking period.

Is worth mentioning that dropping the orphaned data on the recipient could take a long time considering the following points:

  • The command sent to drop the recipient data attaches a session to join the cloning thread launched by the movePrimary coordinator previously. This was introduced in SERVER-81229.
  • The cloning thread is not aborted in case of a failure on the movePrimary coordinator (like a step-down). Therefore, we will wait for a full cloning before releasing the critical section.


 Comments   
Comment by Githook User [ 30/Jan/24 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-85217 Reduce movePrimary critical section time in case of failure before commit phase (#18096)

GitOrigin-RevId: 0fae62de2347fbdfba9747d5cc52ea004903e895
Branch: master
https://github.com/mongodb/mongo/commit/821c4839f200fd13a6b71939741a685c07d8a243

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