Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
1.8.0-rc2
-
None
-
Red Hat Enterprise Linux Server release 5.4 (Tikanga) x86_64
-
Linux
Description
There are some unwanted docs in output of mapreduce. After I switched to 1.6.5, the unwanted docs disappeared. For example,
rs1:PRIMARY> db.metering.find()
{ "_id" : ObjectId("4d7e389b9182b3d84087ca12"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user1", "interval" : "2010-10-27-01", "policies" : { "default" :
}, "accessPaths" : { "rest" :
{ "bwIn" : 984, "bwOut" : 474, "txNum" : 6 } } }
{ "_id" : ObjectId("4d7e38c49182b3d84087ca13"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user2", "interval" : "2010-10-28-01", "policies" : { "policy1" :
}, "accessPaths" : { "rest" :
{ "bwIn" : 1, "bwOut" : 474, "txNum" : 6 } } }
{ "_id" : ObjectId("4d7e3aa89182b3d84087ca14"), "tenId" : "cdp", "subId" : "subt1", "userId" : "user2", "interval" : "2010-10-29-01", "policies" : { "policy1" :
}, "accessPaths" : { "rest" :
{ "bwIn" : 1, "bwOut" : 474, "txNum" : 6 } } }
rs1:PRIMARY> db.nnn.drop()
true
rs1:PRIMARY> m
function () {
emit(
,
{policies:this.policies});
}
rs1:PRIMARY> r
function () {
return
;
}
rs1:PRIMARY> db.metering.mapReduce(m,r,
);
{
"result" : "nnn",
"timeMillis" : 2,
"counts" :
,
"ok" : 1,
}
rs1:PRIMARY> db.nnn.find()
{ "_id" :
, "value" : { "policies" : { "default" :
{ "diskDelta" : 653, "umdDelta" : 34 } } } }
{ "_id" :
, "value" :
{ "du" : 0, "umd" : 0 } }
rs1:PRIMARY>