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

Wrong error given when `create` is missing from a clusteredIndex.

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 7.0.7
    • Component/s: None
    • Labels:
      None
    • Replication
    • ALL
    • Hide

      See above.

      Show
      See above.
    • Execution Team 2024-04-15

      > db.createCollection("foo", {clusteredIndex: {key: {id:1}}, unique: true, expireAfterSeconds: 12345})
      {
              "ok" : 0,
              "errmsg" : "BSON field 'create.unique' is missing but a required field",
              "code" : 40414,
              "codeName" : "Location40414",
              "$clusterTime" : {
                      "clusterTime" : Timestamp(1712323732, 1),
                      "signature" : {
                              "hash" : BinData(0,"GiiotsVGXX4PF71l7/8+DXlqOhU="),
                              "keyId" : NumberLong("7354374102687154181")
                      }
              },
              "operationTime" : Timestamp(1712323717, 1)
      }
      

      The missing field isn’t create.unique; rather, it’s create.clusteredIndex.unique.

            Assignee:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: