即使cluster.node的运行状况为1,它也会在零节点更新的情况下继续返回。
var conditions = { 'nodes.$.health': { $lte: 4 }}
, update = { $inc: { 'nodes.$.health': 1 }}
, options = { multi: true };
cluster.update(conditions, update, options, callbackdb);
function callbackdb (err, numberAffected) {
console.log(numberAffected);
};