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

Mistaken requirement that all remove ops in a sharded collection must include shard key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual, Server
    • Labels:
      None
    • Last comment by Customer:
      true

      Description

      In the 3.0 docs, it says:

      All remove() operations for a sharded collection that specify the justOne option must include the shard key or the _id field in the query specification. remove() operations specifying justOne in a sharded collection without the shard key or the _id field return an error.

      From 3.2 onwards, the "justOne" qualifier is omitted:

      All remove() operations for a sharded collection must include the shard key or the _id field in the query specification. remove() operations without the shard key or the _id field return an error.

      However, versions 3.2+ work the same as 3.0 – a shard key/_id is required only if justOne is true.

        Attachments

          Activity

            People

            Assignee:
            jeffrey.allen Jeffrey Allen
            Reporter:
            eric.sommer Eric Sommer
            Participants:
            Last commenter:
            Jeffrey Allen Jeffrey Allen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 34 weeks, 1 day ago
              Date of 1st Reply: