[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:
Depends
is depended on by SERVER-59786 Prevent concurrent merges Closed
Problem/Incident
causes SERVER-61015 Remove dead checks for ConflictingOpe... Closed
Related
related to SERVER-61785 API for detecting conflicts among Ten... Closed
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: SERVER-60752 PrimaryOnlyService conflict detection API
Branch: master
https://github.com/mongodb/mongo/commit/348fd9169533326d1d034a1dc9c408ebf60c74ec

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