-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.8.1
-
Component/s: Internal Code, Sharding
-
None
-
Environment:linux x64
-
ALL
First, sharding:
> db.adminCommand( { shardcollection : "test.insert_test", key :
{"b":1,"a":1}});
{ "collectionsharded" : "test.insert_test", "ok" : 1 }Then splitting (look at 'a' and 'b' order in shard key and split):
> db.adminCommand( { split : "test.insert_test" , middle :
{ 'a' : 0,'b':1 }} )
{ "ok" : 1 }> use config
switched to db config
> db.chunks.find()
{ "_id" : "test.insert_test-b_MinKeya_MinKey", "lastmod" :
, "ns" : "test.insert_test", "min" : { "b" :
{ $minKey : 1 }, "a" :
{ $minKey : 1 }}, "max" :
{ "a" : 0, "b" : 1 }, "shard" : "shard0000" }
{ "_id" : "test.insert_test-a_0.0b_1.0", "lastmod" :
, "ns" : "test.insert_test", "min" :
{ "a" : 0, "b" : 1 }, "max" : { "b" :
{ $maxKey : 1 }, "a" :
{ $maxKey : 1 }}, "shard" : "shard0000" }
after that any moveChunk command will fail with "Chunk map pointed to incorrect chunk" message, because BSONObj::woCompare, used for searching for a chunk, can't compare
{'a':1,'b':0}with
{'b':0, 'a':1}