Couchbase Counters in java SDK 3.2.1

Hi …
I have been using Couchbase Java sdk 2.7.20 … but recently we migrated our couchbase server from 5.5.1 to 6.6.1 . At the same time we want to upgrade our SDK as well to the latest one which is 3.2.1 .But i have a question. My current couchbase buckets already have a counter enabled using bucket.counter() from the old sdk …

Now i know how to use a bucket using Binary collection from the new SDK … The question is when i do collection.increment() will it start from 0 or will it use the existing counter number and start from there.

Any guidance on this is helpful.

Regards,
Herat

Hi Herat,

Counters are ordinary documents. The new SDK will start from the existing counter number.

Thanks,
David