[SERVER-13108] Error after UnSharding Collection - mongodb Created: 09/Mar/14  Updated: 10/Mar/14  Resolved: 10/Mar/14

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

Type: Question Priority: Major - P3
Reporter: morteza irvani Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: sharding
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-1037 Sharding - command to remove or "unsh... Closed
duplicates SERVER-9845 Command to unshard a collection Closed
Participants:

 Description   

There is Sharded collection named: "Users". I do following for UnShardig Users.

1. sh.stopBalancer()
2. moving all chucks to Primary shard
3. config : db.collections.remove(

{ _id : collection }

)
4. config : db.chunks.remove(

{ ns : collection }

)
5. db.adminCommand("flushRouterConfig")

https://jira.mongodb.org/browse/SERVER-9845

every thing seems good. but when i get db.Users.stats() it throw error :

Sun Mar 9 11:11:54.216 error:

{ "$err" : "stale config on lazy receive :: caused by :: $err: \"[MyDB.Users] shard version not ok in Client::Context: this shard contains versioned chunks for MyDB.Users, but no version set in request...\" ( ns : MyDB.Users, received : 0|0||000000000000000000000000, wanted : 4|0||531c198cc654610530a5f373, recv )", "code" : 9996 }

at src/mongo/shell/query.js:128

and finally after I restart Primary shard, up error disapear.

Do I missed something? or it's mongodb bug?



 Comments   
Comment by Asya Kamsky [ 10/Mar/14 ]

Yes, you missed that all shards cache information about sharding metadata.

The ticket you linked has extensive discussion of this as well as linking to tickets to add support for this operation - further discussion should go to MongoDB-users group.

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