Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15022

[Manual] Wrong position of comment field for delete command

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor - P4
    • Resolution: Fixed
    • None
    • 4.4.0, 5.0.0, 5.2.0
    • manual, Server
    • None
    • ServerDocs2022: Jan25 - Feb1, ServerDocs2022: Feb1 - Feb7, ServerDocs2022: Feb8 - Feb15
    • true

    Description

      Reference manual page for delete command - https://docs.mongodb.com/manual/reference/command/delete/ - says that comment field should be inside of deletes array. However, comment has to be a top level field.

      test> db.runCommand({"delete": "collection0", "deletes": [{"q": {}, "limit": 1, "comment": "test"}]})
      MongoServerError: BSON field 'delete.deletes.comment' is an unknown field.
       
      test> db.runCommand({"delete": "collection0", "deletes": [{"q": {}, "limit": 1}], "comment": "test"})
      {
        n: 0,
        electionId: ObjectId("7fffffff0000000000000004"),
        opTime: { ts: Timestamp({ t: 1641910276, i: 1 }), t: Long("4") },
        ok: 1,
        '$clusterTime': {
          clusterTime: Timestamp({ t: 1641910276, i: 1 }),
          signature: {
            hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
            keyId: Long("0")
          }
        },
        operationTime: Timestamp({ t: 1641910276, i: 1 })
      }
      

      Attachments

        Activity

          People

            sarah.olson@mongodb.com Sarah Olson
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Sarah Olson Sarah Olson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25 weeks, 6 days ago