[SERVER-23327] shardCollection should warn if numInitialChunks is used with non-hashed sharded key Created: 24/Mar/16 Updated: 24/Mar/18 Resolved: 03/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.6 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Andre de Frere | Assignee: | Misha Tyulenev |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Sprint: | Sharding 12 (04/01/16), Sharding 13 (04/22/16), Sharding 14 (05/13/16) | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Currently if a user shards a collection and includes numInitialChunks without a hashed shard key, everything will succeed but the initial chunks value will be ignored. The user in this case could be rightly confused as to what has happened, and reviewing the logs will only indicate that "numChunks : 1". Suggest a warning be given that numInitialChunks is being ignored in these cases |
| Comments |
| Comment by Misha Tyulenev [ 03/May/16 ] |
|
The change alters the shardCollection behavior. It will return an error if numInitialChunks is specified but the collection does not use hashed shard key or not empty. |
| Comment by Githook User [ 03/May/16 ] |
|
Author: {u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}Message: |
| Comment by Kevin Rice [ 24/Mar/16 ] |
|
Missing this warning meant I wasted an hour or two trying and re-trying different things until I just guessed it wasn't possible. |