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

Create a MigrationManager on the balancer

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.10
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 16 (06/24/16), Sharding 17 (07/15/16)
    • 0

      The balancer will handle starting up, shutting down, periodically checking for balancing work, and finding precise chunks to move around. These chunks will then be handed to the MigrationManager, which will: attempt to schedule the migrations; manage the distlocks; maintain information about the migrations in progress. The MigrationManager will call moveChunks in parallel by using the TaskExecutor to asynchronously schedule them. It will then wait synchronously for the moveChunk commands to return.

      MigrationManager

      • schedule the migrations
      • take the distlocks, store them as shared_ptrs in some Migration object
      • hold a set of Migration objects – make up an appropriate name – to maintain information about each active migration.
        • collection NamespaceString
        • distlock shared_ptr
        • ChunkRange
        • toShard
        • fromShard

      TODO in a later ticket: use the information in the Migration objects to determine migration conflicts so that conflicts aren't just found when the moveChunk command is rejected.
      TODO in a later ticket: find a way to parallelize receiving moveChunk responses, so a slow migration won't hold up releasing the distlocks of faster migrations that were scheduled later.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: