-
Notifications
You must be signed in to change notification settings - Fork 393
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
active preflist on bucket key #705
active preflist on bucket key #705
Conversation
get_apl_ann(DocIdx, N, Ring, UpNodes)]. | ||
|
||
%% Get the active preflist taking account of which nodes are up | ||
%% and annotate each node with type of primary/fallback | ||
%% Get the active preflist taking account of which nodes are up and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a @doc
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp. definitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmeiklejohn updated. realized i didn't have a @doc there b/c that module is completely lacking of them. Will one day go through and fix up I reckon.
I'll @doc all the things in this module for consistency. |
Has anyone explored how this works during ring resizing? Do we need to worry about that at all? |
I'm going to say that it's probably not a problem we should worry about in relation to this. If they are resizing their ring, they're dealing w/ other problems/issues. |
How about a nice rebase/squash to wrap this one up? |
yes sir. |
b4807c5
to
c00f3af
Compare
%% Same as get_apl, but returns only the primaries. | ||
%% @doc Get the active preflist for a given {bucket, key} and list of nodes | ||
%% and annotate each node with type of primary/fallback. | ||
-spec get_apl_ann({binary(), binary()}, [node()]) -> preflist_ann(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This spec will be wrong when considering bucket-types. Better to use bucket()
, wherever it is defined.
c00f3af
to
5f6cf05
Compare
-type iterator() :: term(). | ||
-type chashbin() :: term(). | ||
-type docidx() :: chash:index(). | ||
-type partition_id() :: non_neg_integer(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the back-and-forth. Is this not riak_core_ring:partition_id()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp, meant to remove it. My bad.
5f6cf05
to
ae49081
Compare
ae49081
to
97e6903
Compare
👍 97e6903 |
…t-on-bucket-key active preflist on bucket key Reviewed-by: seancribbs
@borshop merge |
Returns active preflist as
Description
Part of RIAK-1481.
The active preflist will return primary/fallback partitions and nodes for the available nodes at the time of query. Primary/fallback will be annotated.
This involves updates to our RiakKV WB code, RiakPB, RiakCore, and RiakAPI.
*The impetus for adding this to the API started with a mailing list question answered by Charlie Voiselle, http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-January/016527.html, which involved a snippet of code that we've given clients multiple times. This was then discussed with Russell Brown on HipChat, https://basho.hipchat.com/history/room/867200/2015/01/13?q=enterprising&t=rid-867200#12:23:22.
Other PRs in the series: