Jiak issue

Paul Rogers riak at dingosky.com
Thu Nov 12 10:39:01 EST 2009

I've run into what is either a Jiak bug or a bug in my expectation.  
I've outlined summary and detail steps to reproduce.


Step 1
   Add data under full or wildcard schema
   e.g. JSON with fields f1, f2, and f3

Step 2
   Restrict write_mask
   e.g. Restrict write mask to just f1 and f3

Step 3
   Update previous data, sending only write_mask fields
   e.g. Update with only JSON fields f1 and f3

   Jiak exception due to write mask violation
   e.g. Error message notes f2 cannot be written, even though f2 was  
not in
   the JSON payload in the Step 3 update.

   In Step 3, it is allowable to send new data with only the f1,f3  
fields, and
   even update that data. Only prior existing data causes the issue.


For brevity I'll only include the JSON payload of the HTTP traffic.

Step 1


":"a85hYGBgzGDKBVIs7Bsj8zKYEhnzWBnMFxUc4csCAA==","lastmod":"Thu, 12  
Nov 2009 15:13:59  

Step 2



Step 3

{"bucket":"b1","key":"v1","object":{"f1":"v1","f3":"new v3"},"links": 
==","vtag":"6FMjBBednEJjWUBrs7qzRK","lastmod":"Thu, 12 Nov 2009  
15:13:59 GMT"}

Write disallowed, some of [<<"f2">>,<<"f3">>] not writable.

As noted above, only f1 and f3 were sent, not f2. Also as noted,  
sending new data with only f1 and f3 is permissible.


PG2cwJTLmsTJwLCk4wpcFAA==","lastmod":"Thu, 12 Nov 2009 15:21:44  

And even updating this newly added data is permissible.

{"bucket":"b1","key":"w1","object":{"f1":"w1","f3":"new w3"},"links": 
==","vtag":"ogFj6mklTCV83pdBgAVqD","lastmod":"Thu, 12 Nov 2009  
15:21:44 GMT"}

+TKYEhnzWBmClhQc4YMKM788bwwV5gAJZwEA","lastmod":"Thu, 12 Nov 2009  

Looks to me that somewhere in either Jiak or Riak the f2 field of the  
existing data is being read and written and that's being flagged as a  
write_mask violation.


More information about the riak-users mailing list