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

An unsplittable collection can remain after a FCV 8.0->7.0 downgrade if it's renamed during untracking

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2025-02-03, CAR Team 2025-02-17
    • 2

      MongoDB 8.0 introduces moving an unsharded collection to a different shard through moveCollection. Technically, this is implemented by registering an unsplittable collection in the sharding catalog, and moving its single chunk to another shard. As unsplittable collections do not exist in previous versions, they are converted back to regular unsharded collections on downgrade (SERVER-86309).

      In most scenarios, this correctly untracks all collections because existing DDLs are drained and no new untracked collections can be created. However, the untracking during downgrade can miss an unsplittable collection if it is renamed during the process:

      1. The untrack-on-downgrade process gathers a list of collections to untrack

      2. One of those collections is renamed [by a rename DDL started after draining]

      3. The untrack-on-downgrade process sends a _shardsvrUntrackUnsplittableCollection command to the primary shard.

      4. The _shardsvrUntrackUnsplittableCollection still succeeds, as it doesn't find a tracked collection on the namespace, and this is considered a success - so the FCV downgrade can continue.

      As a result, an unsplittable collection exists on FCV 7.0.

      A reproducer is attached.

            Assignee:
            robert.sander@mongodb.com Robert Sander
            Reporter:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: