mongdb 集群中removeShard

问题描述:在removeShard时,remaining.chunks的值一直不变

查看share的日志发现 有警告

cannot move chunk: 
the maximum number of documents for a chunk is 250001 , 
the maximum chunk size is 67108864 , 
average document size is 235. 
Found 270976 documents in chunk  
ns: normalhandergps.normalgps1 { key: "" } -> { key: "" } 

原来是因为chunk过大

所以只要在config中修改chunk大小就可以了

db.settings.save( { _id:"chunksize", value: <size> } )

 

 mongodb的这块的源码地址 https://searchcode.com/codesearch/view/9360945/  

  对这块有不错的解释的地址 http://www.udpwork.com/item/12962.html                                                                                                   

posted @ 2017-03-15 17:49  blair_chen  阅读(358)  评论(0编辑  收藏  举报