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

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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • ALL
    • 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" }})

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

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: