[SERVER-54513] Create new resharding recipient state kAwaitingFetchTimestamp Created: 12/Feb/21  Updated: 29/Oct/23  Resolved: 24/Feb/21

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

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-lifecycle
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-53611 Handle errors on donor before donor d... Closed
related to SERVER-54704 Remove processAbortReasonNoDonorMachi... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-02-22, Sharding 2021-03-08
Participants:
Story Points: 1

 Description   

Recipient States should change from 
(1) kUnused

(2) kCreatingCollection // where we currently create the RecipientDocument

to 

(1) kUnused

(2) kAwaitingFetchTimestamp // new place where we create the recipient document, transitions into this state once the coordinator enters CoordinatorStateEnum::kPreparingToDonate
(3) kCreatingCollection // waits for the coordinator to be in CoordinatorStateEnum::kCloning, same as before, before changing into this state.

 

goal:

The coordinator must wait for for all donor and recipient state documents to be inserted before it transitions to kDecisionPersisted with an abortReason.

This means that the flush for CoordinatorStateEnum::kPreparingToDonate must wait for all the participants to majority commit the insertion of the the Donor/Recipient documents.

Motivation:

Currently, it is possible for resharding to fail before recipients have created their ReshardingRecipientService machines. This complicates the logic when the coordinator wants to make sure all participants have aborted the operation before completing.



 Comments   
Comment by Githook User [ 24/Feb/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-54513 Add kAwaitingFetchTimestamp to resharding recipient states.

Also changes the RecoverRefreshThread to insert the donor and recipient
state documents rather than the primary-only service Instance itself.
Branch: master
https://github.com/mongodb/mongo/commit/6ca44ce30689b3fe93d3afe75f07c70a0fdc3d8d

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