[SERVER-9776] Block migrations on hashed shardkeys where MongoD is not 2.4 Created: 24/May/13  Updated: 10/Dec/14  Resolved: 28/Jun/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Hows Assignee: Daniel Pasette (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

One 2.2 Shard Server (shard0001)
One 2.4 Shard Server (shard0000)
One 2.4 MongoS/Config Server

db.test2.drop()
for(i=-5000;i<5000;i++){db.test2.insert(

{x:i}

)}
db.test2.ensureIndex(

{ x : 1 }

);
db.test2.ensureIndex(

{ x : "hashed" }

);
sh.enableSharding("test");
sh.shardCollection("test.test2",

{x:"hashed"}

);
sh.moveChunk("test.test2",

{ x: MinKey}

, "shard0001");
sleep(1000);
sh.splitAt("test.test2",

{ x: 0}

);
sleep(1000);
sh.moveChunk("test.test2",

{ x: MinKey}

, "shard0000");
db.test2.find(

{x:100}

)


Issue Links:
Duplicate
duplicates SERVER-8789 mongos 2.2 can route to incorrect sha... Closed
Related
related to DOCS-1542 Hashed sharding requires 2.4 MongoDs Closed
is related to SERVER-9906 Protecting against version skew betwe... Closed
Operating System: ALL
Participants:

 Description   

If you run a sharded cluster with one shard running 2.2 and one shard running 2.4 you can end up with invalid chunk migrations.

This happens as the 2.2 node incorrectly processes the moveChunk command on the hashed shard key and does not correctly find all documents which should be migrated.

This can potentially leave whole chunks orphaned.



 Comments   
Comment by Daniel Pasette (Inactive) [ 28/Jun/13 ]

There doesn't appear to be a clean way to prevent this at this point.

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