[SERVER-13043] shardCollection don't behave properly Created: 05/Mar/14 Updated: 16/Apr/14 Resolved: 16/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.4.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Melania Zanin | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | sharding | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Cluster on amazon cloud Operating system : AMAZON LINUX AMI |
||
| Issue Links: |
|
||||||||
| Operating System: | Linux | ||||||||
| Steps To Reproduce: | Don't know how to reproduce it. |
||||||||
| Participants: | |||||||||
| Description |
|
I am creating and sharding collections dynamically with the PHP driver every week in this case. When executing the 'shardCollection' db command with my driver, this last returned an exception 'collection already sharded with 1 chunks'. When I take a look at it, the collection in cause (MO_3h.MO_2014_09) isn't sharded at all. Here are some useful data :
When executing a second time the 'shardCollection' db command, everything went right. On which info should I base myself to know if the collection has been sharded or not? The config of the collection or its stats? |
| Comments |
| Comment by Thomas Rueckstiess [ 16/Apr/14 ] |
|
Hi Melania, I'm resolving this ticket now, but if you see the issue again, please re-open the ticket and provide additional information as Dan suggested above. Thanks. |
| Comment by Daniel Pasette (Inactive) [ 15/Mar/14 ] |
|
The information should agree, but the collection.stats.sharded info is derived from the config database. If this happens again, can you please examine and attach the logs from the config server, mongos and primary shard of the collection? |
| Comment by Melania Zanin [ 13/Mar/14 ] |
|
Hi, I don't have them anymore. There was nothing suspicious other than the exception. I don't get how a brand new collection can be already sharded, when in fact it's not. Maybe there was an other problem and the exception caught was this one. Either way, re executing the command gave no problem at all. I just need to know on which info should I base myself to know if the collection has been sharded, if on config.collection or collection.stats.sharded. Thanks |
| Comment by Daniel Pasette (Inactive) [ 09/Mar/14 ] |
|
looks related to Do you have log files from the mongos you were connected to when you ran the command? |