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

Add concurrency control to the CollectionShardingState class such that it no longer depends upon collection locks for concurrency control

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding

      Execution's Lock Free Reads project will allow reads to run without collection and database intent (MODE_IS) locks. The CollectionShardingState class currently relies on collection locks for concurrency control. The implementations of CollectionShardingState must create their own read concurrency control mechanisms that do not rely on reads taking collection IS locks.

      The CollectionShardingRuntime (an implementation of CSS) appears to already have a CSRLock that can be taken in shared and exclusive mode: perhaps its use simply needs to be expanded.

      The two areas of the CollectionShardingRuntime concurrency that appear to be of particular interest are:

      1. Installing new and fetching the current routing table information (CollectionMetadata) for callers.

      2. 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.

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

              Created:
              Updated:
              Resolved: