[DOCS-3039] Document the limitation of removing a single document in sharded the collection Created: 31/Mar/14 Updated: 01/Apr/14 Resolved: 01/Apr/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gianfranco Palumbo | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | sprint-slipstream | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 9 years, 46 weeks, 1 day ago | ||||
| Description |
|
If you delete only one document (using justOne option) without querying by _id, like so:
you'll get this assertion:
This is a restriction for sharded collections. See source code: A warning/note should be added here: This limitation still exists in 2.6 |
| Comments |
| Comment by Githook User [ 01/Apr/14 ] | |||||||||||||||||||||||||||||
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: | |||||||||||||||||||||||||||||
| Comment by Githook User [ 01/Apr/14 ] | |||||||||||||||||||||||||||||
|
Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: | |||||||||||||||||||||||||||||
| Comment by Gianfranco Palumbo [ 01/Apr/14 ] | |||||||||||||||||||||||||||||
|
My bad. I must have tested this in a not sharded database+collection.
| |||||||||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 01/Apr/14 ] | |||||||||||||||||||||||||||||
|
This is not correct and should not change for 2.6. The is a design of sharding and a single (or limited) delete/update is not supported without the shard key, as the error message says. Here is the error message from 2.6:
| |||||||||||||||||||||||||||||
| Comment by Gianfranco Palumbo [ 31/Mar/14 ] | |||||||||||||||||||||||||||||
|
Tested. This limitation does not exists 2.6: For example on 2.4:
On 2.6-rc2:
| |||||||||||||||||||||||||||||
| Comment by Gianfranco Palumbo [ 31/Mar/14 ] | |||||||||||||||||||||||||||||
|
I found that we actually have this in our limits reference page. We should put this in the update() and remove() methods pages. |