mongodb 计数器, 如何能确保并发也没问题呢?

浏览:66日期:2023-07-05

问题描述

之前看到一个 update inc 但是没看到具体怎么实现.

求大神帮帮忙, 给点指引.

问题解答

回答1:

http://docs.mongodb.org/manual/reference/operator/update/inc/

$inc is an atomic operation within a single document.

回答2:

换redis

相关文章: