[SERVER-50906] Consider running shardRemovalHooks synchronously Created: 14/Sep/20  Updated: 27/Oct/23  Resolved: 12/Jan/23

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

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Works as Designed Votes: 0
Labels: sharding-common-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-46202 Implement ShardRegistry on top of Rea... Closed
related to SERVER-72800 Complete TODO listed in SERVER-50906 Closed
Assigned Teams:
Sharding EMEA
Participants:

 Description   

Currently they are run asynchronously, but this means that multiple copies may run concurrently and race with each other (or with ShardRegistry::_lookup() itself). So it may be better to instead run these callbacks synchronously, if possible.



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

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-72800 Complete TODO listed in SERVER-50906
Branch: master
https://github.com/mongodb/mongo/commit/81af184e97056bbd279237a992d5466aabc1b17a

Comment by Tommaso Tocci [ 12/Jan/23 ]

Sharding team is the only one consuming the removal hook API and currently the logic can run concurrently without any problem. Thus we don't see any problem in running the hooks asyncronously.

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