What is the behavior when MongoDB reaches the defined maximum value of $ inc?

0

What is the behavior when Mongo reaches its maximum value for findAndModify with parameters below, how can I reset to 0 when this happens?

        db.collection('count').findAndModify(
        { "_id": "xy" },
        [["_id", 1]],
        { $inc: { seq: 1 } },
        {new: true, 'upsert': true},
    function(err,doc) {
        if (err) throw err;
        console.log(doc.value.seq);
  }
    
asked by anonymous 25.07.2015 / 06:55

0 answers