[SERVER-71566] Skip using the legacy write block mechanism (MovePrimaryInProgress error) Created: 23/Nov/22  Updated: 27/Nov/23  Resolved: 01/Jun/23

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

Type: Task Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-77715 Complete TODO listed in SERVER-71566 Closed
Assigned Teams:
Sharding EMEA
Participants:

 Description   

Before cloning the catalog data, the movePrimary operation blocks writes to ensure the consistency of the cloning information. To do that, a dedicated synchronization mechanism is exposed by the Database Sharding State.

Unlike the critical section, this mechanism ensures that any writes would fail with the MovePrimaryInProgress error instead of waiting for a refresh of the database metadata (handling a StaleConfig error). Since the critical section is already entered by the movePrimary operation, the refresh will take a long time (mainly depending on the actual duration of the cloning of the catalog data).

Once the Online movePrimary project (PM-3025) will be completed, the actual time frame in which writes are blocked will be drastically reduced, and the movePrimary implementation could adopt the critical section as a mechanism to block writes.



 Comments   
Comment by Githook User [ 27/Nov/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-77715 Complete TODO listed in SERVER-71566
Branch: master
https://github.com/mongodb/mongo/commit/4610b1aea19c41b124ad78e8fa83d6617807d84e

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