search

Home  >  Q&A  >  body text

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

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

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

我想大声告诉你我想大声告诉你2794 days ago810

reply all(2)I'll reply

  • 習慣沉默

    習慣沉默2017-04-26 09:04:02

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

    $inc is an atomic operation within a single document.

    reply
    0
  • 高洛峰

    高洛峰2017-04-26 09:04:02

    Change to redis

    reply
    0
  • Cancelreply