Atomic operations for initial parameter counter problem


Hi all,

hi, i try to configure initial parameter for atomic operations Counter just like the example in

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


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.