[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: |
|
||||||||||||
| 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: |
| 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. |