Ya, I had the same problem. You also need to include the vclock. It's
tricky. Notice without the client id the vclock grows. Basically when
you don't use a client id riak randomly assigns one.
I think I settled on creating a new key without a client id and then
using a client id on updates with the vclock.
-alexander
@siculars on twitter
http://siculars.posterous.com
Sent from my iPhone
On May 12, 2010, at 13:52, francisco treacy
<[email protected]> wrote:
Hi all,
From the wiki:
Client ID
All requests should include the X-Riak-ClientId header, which can be
any string that uniquely identifies the client, for purposes of
tracing object modifications in the vector clock.
A few days ago I added it to riak-js (http://github.com/frank06/riak-js
):
options.headers['X-Riak-ClientId'] = options.clientId; // unique
value per client
which means that every request coming out of riak-js included this
HTTP header.
Suddenly updates stop working. So for example the following test
fails:
db.get(bucket, id)(function() { // first retrieval
db.save(bucket, id, { a: 1, b: "test", c: true })(function() { //
saving it with a new value
db.get(bucket, id)(function(response) { // fetching it again -
now should retrieve the updated value
assert.deepEqual(response, { a: 1, b: "test", c: true }); //
but it does not!
})
})
...the value of the object is the original one - db.save() had thus no
effect. Commenting out the clientId header setting, does allow the
test to pass.
So i know it has to do with tracking the vector clock value... what am
I missing here?
Francisco
_______________________________________________
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