使用mongodb mapreduce时服务器崩溃了

时间:2015-02-06 09:07:32

标签: mongodb mapreduce replicaset

我正在使用包含3个成员的复制集,这是解雇mapreduce的代码

var db=new mongodb.Db('sns',replSet,{"readPreference":"secondaryPreferred", "safe":true});
....
collection.mapReduce(Account_Map,Account_Reduce,{out:{'replace': 'log_account'},query:queryObj},function(err,collection){};

然后我的主要人员死亡并重新启动,但投票成为次要人员,并且仍有一个集合sns.tmp.mr.account_0而不是log_account。我对mongodb很新,我真的想弄清楚这个问题是什么。

2015-02-06T14:04:34.443+0800 [conn87299] build index on: sns.tmp.mr.account_0_inc properties: { v: 1, key: { 0: 1 }, name: "_temp_0", ns: "sns.tmp.mr.account_0_inc" }
2015-02-06T14:04:34.443+0800 [conn87299]added index to empty collection
2015-02-06T14:04:34.457+0800 [conn87299] build index on: sns.tmp.mr.account_0 properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "sns.tmp.mr.account_0" }

0 个答案:

没有答案