bryan at basho.com
Thu Nov 12 10:57:12 EST 2009
On Thu, Nov 12, 2009 at 10:39 AM, Paul Rogers <riak at dingosky.com> wrote:
> 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.
> 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.
Hi, Paul. Leaving the f2 field out of your update is seen as changing
f2 to undefined, not as leaving f2 unchanged. You can leave f2 out of
a new object because its value was undefined to begin with (so it's
not a change/write in that case).
More information about the riak-users