Skip to content

Commit

Permalink
Add node_confirms option to write messages (basho#228)
Browse files Browse the repository at this point in the history
* Move deps to merged master from temp 2.2.5 dev

As part of setting up for the 2.2.5 release I made a temp branch off the
last released tag, this takes that branch back into the branch the tag
was cut from.

* Add `node_confirms` option to write messages

For  KV/counter/datatypes all
  • Loading branch information
russelldb authored and Thomas Arts committed Mar 18, 2019
1 parent ed3e9da commit 628b31c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/riak_dt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ message DtUpdateReq {
optional bool sloppy_quorum = 11; // Experimental, may change/disappear
optional uint32 n_val = 12; // Experimental, may change/disappear
optional bool include_context = 13 [default=true]; // When return_body is true, should the context be returned too?
optional uint32 node_confirms = 14; // Distinct phycical node quorum
}


Expand Down
2 changes: 2 additions & 0 deletions src/riak_kv.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ message RpbPutReq {
optional bool sloppy_quorum = 14; // Experimental, may change/disappear
optional uint32 n_val = 15; // Experimental, may change/disappear
optional bytes type = 16; // Bucket type, if not set we assume the 'default' type
optional uint32 node_confirms = 17; // Distinct phycical node quorum
}

// Put response - same as get response with optional key if one was generated
Expand Down Expand Up @@ -264,6 +265,7 @@ message RpbCounterUpdateReq {
optional uint32 dw = 5;
optional uint32 pw = 6;
optional bool returnvalue = 7;
optional uint32 node_confirms = 8; // Distinct phycical node quorum
}

// Counter update response? No message | error response
Expand Down
2 changes: 2 additions & 0 deletions src/riak_pb_dt_codec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ encode_update_options(Update, [{dw,DW}|Tail]) ->
encode_update_options(Update#dtupdatereq{dw=encode_quorum(DW)},Tail);
encode_update_options(Update, [{pw,PW}|Tail]) ->
encode_update_options(Update#dtupdatereq{pw=encode_quorum(PW)},Tail);
encode_update_options(Update, [{node_confirms,NodeConfirms}|Tail]) ->
encode_update_options(Update#dtupdatereq{node_confirms=encode_quorum(NodeConfirms)},Tail);
encode_update_options(Update, [return_body|Tail]) ->
encode_update_options(Update, [{return_body, true}|Tail]);
encode_update_options(Update, [{return_body, RB}|Tail]) ->
Expand Down

0 comments on commit 628b31c

Please sign in to comment.