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

collMod coordinator must block migration on bucket nss (2nd attempt)

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: 6.0.0-rc12
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-07-11, Sharding EMEA 2022-07-25, Sharding EMEA 2022-08-08
    • 5

      Currently the collMod coordinator blocks and resume migrations as part of its coordination.

      In case of sharded timeseries collection we should block migrations on the bucket namespace rather than the view namespace associated with the timeseries collection

      In SERVER-67399 I tried to fix this by just blocking migrations on the targeting namespace.
      Unfortunately I needed to revert the simple fix because I discovered that the kBlockShards phase   of the collMod cooridnator is not idempotent because it performs the following steps:

      1. blocks migrations for the specific collection
      2. acquire the collection critical section on all participant shard.

      In case we already performed 2. we can't re-execute 1. because stopping migrations will serialize with the collection critical section taken by 2.

      In fact as part of blocking migrations we send a {_flushRoutingTableCacheUpdates} to all the shards that in turn blocks behind the acquired critical section

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: