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

createIndexes ignores collectionUUID for time-series

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: 6.0.13
    • Component/s: None
    • Storage Execution
    • Fully Compatible
    • ALL
    • v7.3, v7.0, v6.0
    • Execution Team 2024-02-19, Execution Team 2024-03-04

      The `createIndexes` below should fail because the collectionUUID is nonsensical for a time-series collection.

      Seen on 6.0.13; I suspect this happens on later versions, too.

      > db.createCollection("weather", {timeseries:{timeField:"mytime"}})
      { ok: 1 }
      
      > db.runCommand({createIndexes:"weather", collectionUUID: new UUID("f7a43d7b-22d2-4b9c-b1b3-806924034948"), indexes:[{name:"_fg_", key:{mytime:1}}]})
      {
        numIndexesBefore: 0,
        numIndexesAfter: 1,
        createdCollectionAutomatically: false,
        commitQuorum: 'votingMembers',
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1705695348, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1705695348, i: 1 })
      }
      

            Assignee:
            haley.connelly@mongodb.com Haley Connelly
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: