I've been looking for an answer for days without any luck. I need to know what's the expected behavior when two machines update a remote database simultaneously.
Update method
async function update () {
const filters = { orderNumber: 1, paid: false }
const updates = { paid: true }
const { modifiedCount } = await OrderModel.updateOne(filters, updates)
}
Is it guaranteed that modifiedCount will always be 0 for one machine and 1 for another?