[SERVER-55656] Prevent early destruction of sharding DDL coordinators Created: 30/Mar/21  Updated: 29/Oct/23  Resolved: 06/Apr/21

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

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-55662 Retry NotPrimaryError and ShutdownErr... Closed
is depended on by SERVER-54696 Serialize DDL operations on step-up Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-04-05, Sharding EMEA 2021-05-03
Participants:
Linked BF Score: 138

 Description   

Currently there is no guarantee that the ShardingDDLCoordinator will emplace their completion promises before their destruction. In fact it is possible that we loose all the references to a coordinator, in fact if a stepdown/shutdown happens between:

  1. By removing its stored document (the POS will remove its reference from the active instance map)
  2. By interrupting the command from which the coordinator was originated.

We will loose all the reference to the coordinator that will be destructed without having the chance to set its completion promise.

The proposed solution here is to move the removal of the coordinator document to the onCompletion task of the ShardingDDLCoordinator, so that ti will be done in the same future chain task.



 Comments   
Comment by Githook User [ 06/Apr/21 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-55656 Prevent early destruction of sharding DDL coordinators
Branch: master
https://github.com/mongodb/mongo/commit/8222bef16ae26297f7313274e4ca15eb1dd54655

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