Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node_confirms option to write messages #228

Merged
merged 8 commits into from
Feb 27, 2018
1 change: 1 addition & 0 deletions src/riak_dt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,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 @@ -491,6 +491,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