If I store an array-like structure in couchbase like this one:
mykey = 3
key_1 = 47
key_2 = 11
key_3 = 17
and my update procedure is something like this:
a = increment(mykey)
set key_a = 42
will this work on a bucket replicated across multiple datacenters? Is there a better way of doing this?
I'm thinking that two clients on different data centers might call increment at the same time, getting the same value, and then setting the same key to different values.