[SERVER-3080] chunkSplit doesn't check order of fields in compound key in 'middle' param and damages config.chunks collection Created: 11/May/11 Updated: 12/Jul/16 Resolved: 20/Jun/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Sharding |
| Affects Version/s: | 1.8.1 |
| Fix Version/s: | 1.9.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sergey Tikhonov | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux x64 |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
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 , "ns" : "test.insert_test", "min" : { "b" : { $minKey : 1 }, "a" : { $minKey : 1 }}, "max" : { "a" : 0, "b" : 1 }, "shard" : "shard0000" } , "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} |
| Comments |
| Comment by Mathias Stearn [ 20/Jun/11 ] |
|
This will now error out before doing the split |
| Comment by auto [ 20/Jun/11 ] |
|
Author: {u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Don't allow manual split-point with different field order |