[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:
Documented
is documented by DOCS-8927 shardCollection should warn if numIni... Closed
Duplicate
is duplicated by SERVER-14313 Warn if numInitialChunks used for sha... Closed
Related
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: SERVER-23327 shardCollection should warn if numInitialChunks is used with non hashed sharded key
Branch: master
https://github.com/mongodb/mongo/commit/9fab79e546604a74d577bbc1672e78d4bf849e82

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.
If I'm spending this time, I figured other people might be making the same mistake and wasting their time, too.

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