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

Reply via email to