現象
2018-02-06T14:41:05.130+0800 I SHARDING [Balancer] moveChunk result: { cause: { ok: 0.0, errmsg: "can't accept new chunks because there are still 1236 deletes from previous migration" }, ok: 0.0, errmsg: "moveChunk failed to engage TO-shard in the data
transfer: :: caused by :: UnknownError: can't accept new chunks because there are still 1236 deletes...", code: 8 }
mongos集羣數據分佈不均勻,後臺日誌顯示move chunk失敗,我嘗試手工遷移,報錯一樣
mongos> sh.moveChunk("recruit.externalResumeStorage", {"rid" : "1836776472", "sourceId" : 6}, "udb-f4rrmx")
{"cause" : {
"cause" : {
"ok" : 0,
"errmsg" : "can't accept new chunks because there are still 1236 deletes from previous migration"
},
"ok" : 0,
"errmsg" : "moveChunk failed to engage TO-shard in the data transfer: :: caused by :: UnknownError: can't accept new chunks because there are still 1236 deletes from previous migration",
"code" : 8
},
"code" : 8,
"ok" : 0,
"errmsg" : "move failed"
}
故障原因
應該是bug,參考https://jira.mongodb.org/browse/SERVER-14047
解決方法
重啓整個mongos集羣,包括mongos節點,config節點,sharding節點