problem with clientId in library

francisco treacy francisco.treacy at
Wed May 12 13:52:26 EDT 2010

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 (

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, 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 - 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?


More information about the riak-users mailing list