[SERVER-60752] API for detecting conflicts among PrimaryOnlyService instances Created: 15/Oct/21 Updated: 29/Oct/23 Resolved: 25/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Server Serverless 2021-10-18, Server Serverless 2021-10-25, Server Serverless 2021-11-01 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||||||
| Description |
|
Many POS subclasses have restrictions on instances, e.g. there can't be two TenantMigrationDonorService::Instance objects with the same tenantId. It's hard to enforce such a rule without races: you'd need to hold the PrimaryOnlyService mutex while checking the rule, but the mutex is private. Different services use different techniques, e.g. relying on a unique index, or relying on some other registry to enforce the rule. Let's make a general mechanism for PrimaryOnlyService conflict detection. Use the new mech in place of the messy way TenantMigrationDonorService enforces its unique tenantId rule. |
| Comments |
| Comment by Githook User [ 25/Oct/21 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |