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

`delete` and `update` mishandle `collectionUUID`

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: 7.0.1
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • v7.0, v6.0
    • Execution NAMR Team 2023-10-16, Execution Team 2023-10-30

      When I `delete` from a time-series collection with a `collectionUUID` the error is a bit strange:

      db.runCommand({delete:"weather", collectionUUID: UUID("12345678-1234-1234-1234-f776a983614a"), deletes:[{ q:{ timestamp: new Date() }, limit: 0}]});
      {
        n: 0,
        writeErrors: [
          {
            index: 0,
            code: 361,
            errmsg: 'Collection UUID does not match that specified',
            db: 'test',
            collectionUUID: new UUID("12345678-1234-1234-1234-f776a983614a"),
            expectedCollection: 'system.buckets.weather',
            actualCollection: null
          }
        ],
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1695405156, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1695405152, i: 1 })
      }
      

      Note that it says the "expectedCollection" is `system.buckets.weather`, not `weather`.

      I see the same behavior with `update`.

      I don't think this will cause breakage, and the `actualCollection` is correct when I give it the UUID of a real collection.

      Seen in 7.0.1; it may affect other versions.

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: