[SERVER-14512] How to fix bad shard key Created: 09/Jul/14  Updated: 10/Dec/14  Resolved: 09/Jul/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.6.3
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Eric Bechtel Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All servers are running on OS Ubuntu 12.04, 16Gb RAM, 500Gb HDD, Intel Xeon CPU on each server


Participants:

 Description   

Hi,

I have a problem with one of our shards. For some reason I'm getting the next usage

15:38:42 up 4 days, 10:28, 1 user, load average: 3.67, 3.50, 3.56
In the mean time all other shards are ok. Their average load approx:

16:49:58 up 11 days, 56 min, 1 user, load average: 0.03, 0.03, 0.05
I have 3config, 2 query and 7 shards (all of them are primary replicaset. don't ask why). I have 2 databases: 20Gb and 30gb. All servers are the same in their configuration. Also, in each database only 1 collection.
The problem with inapropritae shard key.
Please let me know what will be better:

a) make backups of current 2 databases, destroy them via mongos shell, create new databases with correct shard keys and upload our dumps
b) follow with suggestion on StackExchange from on of your staff and Unshard collection?

Our cluster is working as a test environment.
Thank you.



 Comments   
Comment by Ramon Fernandez Marina [ 09/Jul/14 ]

eric.bechtel@webjet.com, since this a test environment I'd do a backup+restore cycle (your first option).

Note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. For general questions like this one your best option is to post it on the mongodb-users group.

Generated at Thu Feb 08 03:35:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.