(MGR与Mongodb类似,分布式系统)
【Mongodb此时如何将secondary变成primary】
1、节点以standalone方式启动,而不是副本集启动,重建剩下2个节点...survey
xiaoxu:SECONDARY> db.survey.find().count();
1000000
xiaoxu:SECONDARY>
xiaoxu:SECONDARY> db.survey.drop.../shell/utils.js:25:13
DBCollection.prototype.drop@src/mongo/shell/collection.js:752:1
@(shell):1:1
3、...survey
> show tables;
survey
test
> db.test.find()
{ "_id" : 7, "type" : "food", "item" : "ccc", "ratings...", "ratings" : [ 5, 9, 5 ] }
{ "_id" : 6, "type" : "food", "item" : "bbb", "ratings" : [ 5, 9 ] }
> db.test.find