Hello! When you do your fetch (read) and resolve any conflicts, you're going to get a vector clock along with each sibling. If you're using the default JSONConverter it will be stored in your POJO's @RiakVClock annotated field. That's the vector clock you're going to use when you do your store (write) later - the modified object you're passing to Bucket.store() should contain it.
The withoutFetch() option simply allows you to break this into two separate actions. Without it, when you called StoreObject.execute() that's exactly what would be happening. Thanks! - Roach On Sat, Apr 27, 2013 at 5:35 PM, Y N <[email protected]> wrote: > Hi, > > I am currently using the latest java client, and I have a question regarding > updating data in a bucket where siblings are allowed (i.e. allowSiblings = > true). > > I finally understand the whole read-resolve-mutate-write cycle, and also > doing an update / store using previously fetched data (i.e. not in the same > "transaction"). > > This question is regarding the latter case (updating previously fetched > data). My read uses a resolver. My data class has a @RiakVClock field > defined. > > The problem is when I do the store(blah).withoutFetch(). It seems to be > generating siblings. I just realized that's probably because my resolver > (during the read) is creating a new object and then merging then siblings > into the new object, however it's not setting the vclock field. > > My question is, during the read resolve stage, what should I use for the > vlock? Should I just copy it from one of the other siblings, or is there > some specific sort order I should use to pick a particular vlock for the new > object? > > Thanks. > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
