Couchbase Atomic Counter and Java Client

The atomic counter feature of Couchbase has been discussed extensively. But, a few crucial issues seem to have been glossed over. Most tutorials, such as this, as well as the official document, go as follows:

  1. Step 1 – Initialize the counter.
  2. Step 2 – Increment the counter.

There are a few crucial issues left out in this discussion. You are likely to encounter these issues on day one if you try to use atomic counter in a real application. I hope this post will answer those questions for you.

Continue reading