From 628b31cb7c2e515efcf216d779d83e9909effdff Mon Sep 17 00:00:00 2001 From: Russell Brown Date: Tue, 27 Feb 2018 09:05:20 +0000 Subject: [PATCH] Add `node_confirms` option to write messages (#228) * 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 --- src/riak_dt.proto | 1 + src/riak_kv.proto | 2 ++ src/riak_pb_dt_codec.erl | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/riak_dt.proto b/src/riak_dt.proto index f5e48164..f0ecaec9 100644 --- a/src/riak_dt.proto +++ b/src/riak_dt.proto @@ -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 } diff --git a/src/riak_kv.proto b/src/riak_kv.proto index 1155a87e..df6172ad 100644 --- a/src/riak_kv.proto +++ b/src/riak_kv.proto @@ -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 @@ -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 diff --git a/src/riak_pb_dt_codec.erl b/src/riak_pb_dt_codec.erl index 06dfbbdb..379a8164 100644 --- a/src/riak_pb_dt_codec.erl +++ b/src/riak_pb_dt_codec.erl @@ -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]) ->