問題描述:在removeShard時,remaining.chunks的值一直不變html
查看share的日誌發現 有警告mongodb
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過大spa
因此只要在config中修改chunk大小就能夠了日誌
db.settings.save( { _id:"chunksize", value: <size> } )
mongodb的這塊的源碼地址 https://searchcode.com/codesearch/view/9360945/ code
對這塊有不錯的解釋的地址 http://www.udpwork.com/item/12962.html orm