mongodb多個collection及shard的問題
2 回答

ibeautiful
TA貢獻(xiàn)1993條經(jīng)驗 獲得超6個贊
sharded cluster都有一個primary shard,沒有sharded的collection都是只存在這個shard里的,所以你要建一個新的collection,在你使用sh.shardCollection()之前,它是只存在這個primary shard里面的。primary shard是你在設(shè)定這個cluster的時候第一個添加的shard,或者是你設(shè)定好cluster之后用movePrimary重新指定的shard。
如果你不對這個collection執(zhí)行sh.shardCollection(),那它就不是sharded collection,所以也就不會往其他shard上面寫。
這些mongodb的文檔上都寫了的,你在它網(wǎng)站上檢索就行。
- 2 回答
- 0 關(guān)注
- 799 瀏覽
添加回答
舉報
0/150
提交
取消