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

API for detecting conflicts among PrimaryOnlyService instances

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.2.0
    • None
    • None
    • Fully Compatible
    • Server Serverless 2021-10-18, Server Serverless 2021-10-25, Server Serverless 2021-11-01
    • 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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: