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

collMod output should be compatible with replica-set when called against unsplittable collections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2024-02-19, CAR Team 2024-03-04, CAR Team 2024-03-18
    • 117

      Running collmod on a sharded collection returns the following fields:

      • raw
      • ok
      • $clusterTime
      • operationTime

      However, In order to guarantee output parity between replicaset and sharded cluster, the collmod coordinator enforces raw + single field output when working on an unsharded collection 

      Example:

      `
      {collMod: "x", index: {keyPattern:

      {type: 1}

      , expireAfterSeconds: 3600}
      `
      will return

      • { raw,ok,$clusterTime,operationTime }

        on a sharded cluster for a sharded collection

      • expireAfterSeconds_new,ok,$clusterTime,operationTime in a replica-set 
      • raw, expireAfterSeconds_new,ok,$clusterTime,operationTime  on a unsharded collection in a sharded cluster

      Unsplittable collection are now treated as sharded collection, and they are currently missing the *_new *_old fields that guaranteed the parity. 

      The goal for the ticket is to reintroduced those fields in case of unsplittable collection. 

      Note: You can easily replicate the issue by adding a {createUnsplittableCollection : x } in the setup phase of mongos_unsharded_commands_interface_parity_with_replica_set.js 
       
       

            Assignee:
            david.dominguez@mongodb.com David Dominguez Sal (Inactive)
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: