Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60752

API for detecting conflicts among PrimaryOnlyService instances

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Server Serverless 2021-10-18, Server Serverless 2021-10-25, Server Serverless 2021-11-01
    • 15

      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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: