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

Add concurrency control to setting and unsetting the ShardingMigrationCriticalSection flag that does not rely upon collection locks

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Storage Execution

      The ShardingMigrationCriticalSection for each collection has no concurrency control itself. It depends upon the CollectionShardingRuntime to provide concurrency control. The two ShardingMigrationCriticalSection::entering* functions expect a collection X lock, the ShardingMigrationCriticalSection::exit* function expects a IX lock, and ShardingMigrationCriticalSection::get* presumably expects callers to hold a collection IS lock.

      I do not understand how ShardingMigrationCriticalSection::get* and ShardingMigrationCriticalSection::exit* are concurrency safe, setting and accessing the same private class variable without a mutex to serialize such operations?

      (note: this is going to remain on the execution backlog until the project design is finalized, then it will be passed to sharding to complete. this is to keep track of the work specifics)

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: