Resharding (e.g. moveCollection) may track system.buckets.coll in the global catalog when coll is already tracked

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.0.0, 8.1.0, 8.3.0-rc0, 8.2.0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2025-09-15
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Due to SERVER-90862, it is possible that both coll and system.buckets.coll exist as regular collections in the local catalog.

       

      If this occurs, it should not be possible to shard both coll and system.buckets.coll so that they both appear in the global catalog (config.collections). This is the case when using shardCollection, but using a combination of shardCollection and moveCollection will allow both collections to be tracked:

      MongoDB Enterprise mongos> db.adminCommand({shardCollection: "test.coll", key: {_id: 1}})
      {
          "collectionsharded" : "test.coll",
          "ok" : 1,
          "$clusterTime" : {
              "clusterTime" : Timestamp(1756722799, 37),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          },
          "operationTime" : Timestamp(1756722799, 37)
      }
      MongoDB Enterprise mongos> db.adminCommand({moveCollection: "test.system.buckets.coll", toShard: "repro-BF-39313-rs1"})
      {
          "ok" : 1,
          "$clusterTime" : {
              "clusterTime" : Timestamp(1756722828, 47),
              "signature" : {
                  "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                  "keyId" : NumberLong(0)
              }
          },
          "operationTime" : Timestamp(1756722828, 47)
      }
      
      MongoDB Enterprise mongos> db.getSiblingDB("config").collections.find({}, {_id: 1})
      { "_id" : "config.system.sessions" }
      { "_id" : "test.coll" }
      { "_id" : "test.system.buckets.coll" }
      

       

      Resharding a timeseries collection should validate that the main namespace is not already tracked.

            Assignee:
            Joan Bruguera Micó
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: