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

movePrimary shouldn't create indexes for sharded collections

    • Fully Compatible
    • ALL
    • v6.3, v6.0, v5.0
    • Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20, Sharding EMEA 2023-03-06
    • 9

      Before cloning unsharded collections, the movePrimary operation creates the indexes that are not present on the destination shard (i.e. the candidate to be primary). This creation of indexes was designed for unsharded collections: since the collection doesn't exist on the destination shard, we create the indexes assuming that the collection doesn't have data. However, we also try to create indexes for sharded collection which is risky because we might hit an invariant if we end up trying to create an index over a collection with data.

            Assignee:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Reporter:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: