Q:

mongoose update not working with write concern disabled

I want to get rid of the callback on "db-operation finished" (hoping to improve the performance inside of node.js - I am updating several 100k documents and it takes very long time with node memory consumption going to 1.5GB and one core is maxed out).
MongoBooks is my mongoose model.
This is the (test) code with a callback, which is working, it inserts a document into empty db:
MongoBooks.update({ isbn13: "abc" }, { isbn13: "abc", author: "andreas" }, { upsert: true }, function(err, res) {
        console.log(err, res);
    });

This is the code without the callback and a write concern of 0 - this is the version that I hope would improve performance (it does) but without doing anything to the database (I check through mongo repl on the collection):
MongoBooks.update({ isbn13: "abc" }, { isbn13: "abc", author: "andreas" }, { upsert: true, w: 0 });

How come that with w : 0 there is nothing done to the database?

A:

According to the Mongoose 3.8 release notes, you must either pass a callback or explicitly tell Mongoose to execute the "unsafe" update by passing true for the callback parameter.
So it should be:
MongoBooks.update({ isbn13: "abc" }, 
                  { isbn13: "abc", author: "andreas" }, 
                  { upsert: true, w: 0 },
                  true);

