刪除mongo分片collection失敗

在中止balancer以後,備份整個分片庫,而後啓用balancer,刪除分片集合並重建。遇到如下報錯:shell

mongos> db.businessInfo.drop();
2016-08-14T09:06:58.324+0800 E QUERY    Error: drop failed: {
"code" : 13331,
"ok" : 0,
"errmsg" : "exception: collection's metadata is undergoing changes. Please try again."
}
    at Error (<anonymous>)
    at DBCollection.drop (src/mongo/shell/collection.js:620:15)
    at (shell):1:12 at src/mongo/shell/collection.js:620ide



理了一下邏輯,應該先drop sharding collection而後再啓用balancer.
code

相關文章
相關標籤/搜索