Skip to content

Commit

Permalink
Add PB API for GET node_confirms
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsumner committed Feb 19, 2020
1 parent 6e53a60 commit 9625792
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/riak_dt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ message DtFetchReq {
// For read-only requests or context-free operations, you can set
// this to false to reduce the size of the response payload.
optional bool include_context = 11 [default=true];

optional uint32 node_confirms = 12; // 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 @@ -57,6 +57,7 @@ message RpbGetReq {
optional bool sloppy_quorum = 11; // Experimental, may change/disappear
optional uint32 n_val = 12; // Experimental, may change/disappear
optional bytes type = 13; // Bucket type, if not set we assume the 'default' type
optional uint32 node_confirms = 14; // Distinct phycical node quorum
}

// Get Response - if the record was not found there will be no content/vclock
Expand Down Expand Up @@ -281,6 +282,7 @@ message RpbCounterGetReq {
optional uint32 pr = 4;
optional bool basic_quorum = 5;
optional bool notfound_ok = 6;
optional uint32 node_confirms = 7; // Distinct phycical node quorum
}

// Counter value 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 @@ -238,6 +238,8 @@ encode_fetch_options(Fetch, [basic_quorum|Tail]) ->
encode_fetch_options(Fetch, [{basic_quorum, true}|Tail]);
encode_fetch_options(Fetch, [{basic_quorum, BQ}|Tail]) ->
encode_fetch_options(Fetch#dtfetchreq{basic_quorum=BQ},Tail);
encode_fetch_options(Fetch, [{node_confirms, NodeConfirms}|Tail]) ->
encode_fetch_options(Fetch#dtfetchreq{node_confirms=encode_quorum(NodeConfirms)}, Tail);
encode_fetch_options(Fetch, [notfound_ok|Tail]) ->
encode_fetch_options(Fetch, [{notfound_ok, true}|Tail]);
encode_fetch_options(Fetch, [{notfound_ok, NOK}|Tail]) ->
Expand Down

0 comments on commit 9625792

Please sign in to comment.