[DOCS-3387] Comment on: "manual/tutorial/deploy-shard-cluster.txt" Created: 12/May/14  Updated: 03/Nov/17  Resolved: 01/Jul/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: Stephen Dillon Assignee: Sam Kleinman (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB 2.6.1 running on Windows Server 2012 R2 Datacenter and installed via the mongodb-win32-x86_64-2008plus-2.6.1.msi package

Location: http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
Referrer: http://docs.mongodb.org/manual/administration/sharded-clusters/
Screen Resolution: 1680 x 1050
repo: docs
source: tutorial/deploy-shard-cluster


Participants:
Days since reply: 9 years, 33 weeks, 2 days ago

 Description   

In version 2.6.1 an index is not automatically created on an empty shard.



 Comments   
Comment by Sam Kleinman (Inactive) [ 01/Jul/14 ]

When you shard an empty collection, MongoDB will automatically create the shard key index (in addition to the index on the _id field, which MongoDB creates on all collections.) If the collection has any data, you must have an index on the shard key, or the shard key must be a prefix of an existing index.

This behavior is unchanged in the 2.6 series from previous versions based on my examination of the code. If you observe another behavior we should investigate that separately, either as a support issue, or as an issue with the server itself (i.e. SERVER).

I'm going to go ahead and close this ticket for now, but we can reexamine it later if we discover an undocumented behavior or a useful clarification.

Generated at Thu Feb 08 07:45:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.