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

Time-series collections can only remove documents whose _id is an ObjectId

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      > db.createCollection('system.buckets.c', {clusteredIndex: true})
      > db.system.buckets.c.insertOne({_id:1})
      { "acknowledged" : true, "insertedId" : 1 }
      > db.system.buckets.c.remove({_id:1})
      WriteResult({WriteResult({ "nRemoved" : 0, "writeError" : { "code" : 13111, "errmsg" : "wrong type for field (_id) double != objectId" }})

      Show
      > db.createCollection('system.buckets.c', {clusteredIndex: true}) > db.system.buckets.c.insertOne({_id:1}) { "acknowledged" : true, "insertedId" : 1 } > db.system.buckets.c.remove({_id:1}) WriteResult({WriteResult({ "nRemoved" : 0, "writeError" : { "code" : 13111, "errmsg" : "wrong type for field (_id) double != objectId" }})

      Description

      On clustered collections, the remove path seems to assume that the _id of a document is always an ObjectId.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-execution Backlog - Storage Execution Team
            Reporter:
            josef.ahmad Josef Ahmad
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: