You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the recommended API is PB. That said, I would expect the presence of the context in any disable operation of a flag in a map to be validated also server side by Riak KV, rather than performing an unsafe choice somewhere in Riak KV (at least when called via HTTP). This would make all Riak KV clients, both PB and HTTP based, more robust.
The text was updated successfully, but these errors were encountered:
Basho-JIRA
changed the title
Attempt via HTTP API to disable existing flag in map without providing context shall be discarded
Attempt via HTTP API to disable existing flag in map without providing context shall be discarded [JIRA: DOC-768]
Dec 20, 2016
(I am currently in the design phase of a project hence I looked into this and opened ticket for tracking.)
Expected result
From https://github.com/basho/basho_docs/blob/e6550cb629a2abfb4dfac156d6e68d6236d6ae06/content/riak/kv/2.2.0/developing/data-types/maps.md#flags :
Also, first the non-merged PR https://github.com/basho/basho_docs/pull/1550/files#diff-b79a647609dd35cb310d1d7cddf7a12aR1005 and then the recently merged PR https://github.com/basho/basho_docs/pull/2315/files#diff-3eef66dba92a758b737a0b505eea4645R449 proposed update of HTTP example along this line.
Actual result on HTTP
Via HTTP API on Riak KV 2.2.0:
Actual result on PB
Via PB API (riakc), a disable operation for a flag in a map cannot be encoded without context.
Considerations
I understand that the recommended API is PB. That said, I would expect the presence of the context in any disable operation of a flag in a map to be validated also server side by Riak KV, rather than performing an unsafe choice somewhere in Riak KV (at least when called via HTTP). This would make all Riak KV clients, both PB and HTTP based, more robust.
I understand the relevant CRDT is https://github.com/basho/riak_dt/blob/f96f943ca66902e12263a445cf9099d7f635d5ab/src/riak_dt_od_flag.erl#L3-L4 (not sure about the version/changeset of such CRDT in Riak KV 2.2.0).
The text was updated successfully, but these errors were encountered: