[SERVER-6676] features1.js checkShardingIndex fails with 2.0 mongod 2.2 mongos Created: 01/Aug/12 Updated: 09/Aug/12 Resolved: 03/Aug/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.2.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | Kevin Matulef |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Log from failure is attached. Prevents the sharding of a collection over particular keys, unclear what patterns trigger this but potentially only when the shard key is not an exact match for the index key. |
| Comments |
| Comment by auto [ 03/Aug/12 ] | |||
|
Author: {u'date': u'2012-08-03T14:19:39-07:00', u'email': u'matulef@10gen.com', u'name': u'Kevin Matulef'}Message: | |||
| Comment by Kevin Matulef [ 03/Aug/12 ] | |||
|
FYI, if you have a 2.2 mongos talking to a 2.2 mongod, and you take the above steps, sharding the collection will succeed. However if you also have other shards running 2.0, they won't be able to receive chunks until they are also upgraded. The error message you will get if you try to migrate chunks to the 2.0 shards will look like the following:
| |||
| Comment by Kevin Matulef [ 03/Aug/12 ] | |||
|
Actually, this isn't really an issue, since the shardCollection command should fail if try to shard on a prefix shard key but your mongod is still on 2.0. Right now, if you have a 2.2 mongos talking to a 2.0 mongod, and you try to shard a new empty collection, here's what you get:
To solve this, you either need to upgrade your mongod, or create an index just on { num : 1 }. | |||
| Comment by Kevin Matulef [ 03/Aug/12 ] | |||
|
The issue with features1.js is that mongos 2.2 is more permissive about the shard keys it allows (anything that's a prefix of an existing index. see | |||
| Comment by Greg Studer [ 01/Aug/12 ] | |||
|
index1.js also fails with 2.0/2.2 for I think the same reason, but other changes post-2.0 exclude it from being automatically tested. | |||
| Comment by Greg Studer [ 01/Aug/12 ] | |||
|
also note - error output was gathered by manually pushing up the logLevel to 1 on mongod and printing out the command result right before the assert, hence the extra messages. | |||
| Comment by Greg Studer [ 01/Aug/12 ] | |||
|
note - features1.js hasn't been modified significantly since 2.0. |