[DOCS-11163] Mistaken requirement that all remove ops in a sharded collection must include shard key Created: 31/Dec/17  Updated: 30/Oct/23  Resolved: 13/Feb/18

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Eric Sommer Assignee: Jeffrey Allen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 5 years, 50 weeks, 1 day ago

 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.



 Comments   
Comment by Githook User [ 27/Feb/18 ]

Author:

{'email': 'jeffrey.allen@10gen.com', 'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo'}

Message: DOCS-11163 - Fixing note about sharded collections for remove ops
Branch: v3.2
https://github.com/mongodb/docs/commit/e0dbee9b2308806e9d587192034b2417163cb61c

Comment by Githook User [ 27/Feb/18 ]

Author:

{'email': 'jeffrey.allen@10gen.com', 'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo'}

Message: DOCS-11163 - Fixing note about sharded collections for remove ops
Branch: v3.4
https://github.com/mongodb/docs/commit/03f592fef07a7d73dee9ac4849256660babed16b

Comment by Githook User [ 27/Feb/18 ]

Author:

{'email': 'jeffrey.allen@10gen.com', 'name': 'jeff-allen-mongo', 'username': 'jeff-allen-mongo'}

Message: DOCS-11163 - Fixing note about sharded collections for remove ops
Branch: master
https://github.com/mongodb/docs/commit/44934035fd5212926970c65fcfe1de6432558dff

Comment by Jeffrey Allen [ 13/Feb/18 ]

This is RFM: https://github.com/mongodb/docs/pull/3229

Comment by Allison Reinheimer Moore [ 02/Jan/18 ]

Todo: Verify that shard key or _id are required only if justOne is true, and tweak note accordingly.

Generated at Thu Feb 08 08:02:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.