# Atomic operations for initial parameter counter problem

#1

Hi all,

hi, i try to configure initial parameter for atomic operations Counter just like the example in http://developer.couchbase.com/documentation/server/4.1-dp/sdks/go-beta/atomic-operations.html

value, _, _ := bucket.Counter(“counter-agent”, 1, 1, 0)

in the document said:
You can additionally perform a counter operation with an initial value specified. In this case, the document will be created if it does not exist. The initial parameter will do nothing if the document already exists.

but it seem the value always 0 and the counter-agent document not created. i really need this features, so i dont have to check whether the document exist or not. please help

#2

hi, i was sucessfull setup the initial parameter for atomic counter. it seem if i set the cache metada to full ejection, the initial parameter not working, but when i change into value ejection, the initial paremeter for atomic counter working.