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

Get rid or fix best effort check for primary db on rename path in sharded clusters

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0, 6.0.6, 5.0.17, 6.3.1
    • Affects Version/s: 5.0.15, 7.0.0-rc0, 6.0.5, 6.3.0-rc2
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • v6.3, v6.0, v5.0

      When a rename collection between different dbs is received by the (potential) primary shard of the source collection, a best effort check is executed before spawning the coordinator to make sure that both databases reside on the same shard (it's not allowed to rename collections between dbs with a different primary shard).

      The check relies on cached info that may be stale, so the rename may fail even when both dbs reside on the same primary.

      Solution 1
      Change this check in order to refresh. The advantage is that rename operations can prematurely fail without serializing on the DDL lock when the dbs reside on different primary shards.

      Solution 2

      Simply get rid of the check because the same check is performed after spawning the coordinator when it is ensured the primary shard for the source db can't change.

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            0 Vote for this issue
            4 Start watching this issue