Skip to content

Commit

Permalink
0.10.3 (#98)
Browse files Browse the repository at this point in the history
* Add RclRef tests (#85)
* Basho 3.0 upstream (#93)
  • Loading branch information
albsch authored Jul 13, 2021
1 parent 5c6b82d commit fadf987
Show file tree
Hide file tree
Showing 18 changed files with 158 additions and 954 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Erlang CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

Expand Down Expand Up @@ -58,3 +56,28 @@ jobs:
- run: make lint
- run: make dialyzer

system-tests:
runs-on: ubuntu-latest
strategy:
matrix:
erlang: [ 21,22,23,24 ]

container:
image: erlang:${{ matrix.erlang }}

steps:
- uses: actions/checkout@v2
with:
repository: riak-core-lite/rclref
path: ./rclref

- uses: actions/checkout@v2
with:
path: ./riak_core/

- run: |
mkdir rclref/_checkouts;\
ln -s ../../riak_core/ rclref/_checkouts/riak_core;\
cd rclref;\
make ct
82 changes: 0 additions & 82 deletions docs/rack-awareness.md

This file was deleted.

Binary file removed docs/ring-location.png
Binary file not shown.
8 changes: 4 additions & 4 deletions include/riak_core_handoff.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

-record(ho_stats,
{interval_end :: erlang:timestamp(),
last_update :: erlang:timestamp() | undefined,
last_update = os:timestamp() :: erlang:timestamp(),
objs = 0 :: non_neg_integer(),
bytes = 0 :: non_neg_integer()}).

Expand Down Expand Up @@ -50,10 +50,10 @@
type :: ho_type() | undefined,
req_origin :: node(),
filter_mod_fun :: {module(), atom()} | undefined,
size ::
size = {0, objects}::
{function(), dynamic} |
{non_neg_integer(), bytes | objects} |
undefined}).
{non_neg_integer(), bytes | objects}
}).

-type handoff_status() :: #handoff_status{}.

Expand Down
2 changes: 1 addition & 1 deletion src/riak_core.app.src
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{application,
riak_core,
[{description, "Riak Core Lite"},
{vsn, "0.10.2"},
{vsn, "0.10.3"},
{applications,
[kernel, stdlib, crypto, os_mon, poolboy]},
{mod, {riak_core_app, []}},
Expand Down
20 changes: 7 additions & 13 deletions src/riak_core_claim.erl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ wants_claim_v2(Ring, Node) ->
Count = proplists:get_value(Node, Counts, 0),
case Count < Avg of
false -> no;
true -> {yes, Avg - Count}
true ->
{yes, Avg - Count}
end.

%% @doc Provide default choose parameters if none given
Expand Down Expand Up @@ -293,8 +294,7 @@ choose_claim_v2(Ring, Node, Params0) ->
%% number of indices desired is less than the computed set.
Padding = lists:duplicate(TargetN, undefined),
Expanded = lists:sublist(Active ++ Padding, TargetN),
PreferredClaim = riak_core_claim:diagonal_stripe(Ring,
Expanded),
PreferredClaim = riak_core_claim:diagonal_stripe(Ring, Expanded),
PreferredNth = [begin
{Nth, Idx} = lists:keyfind(Idx, 2, AllIndices),
Nth
Expand All @@ -316,13 +316,9 @@ choose_claim_v2(Ring, Node, Params0) ->
TargetN,
RingSize),
%% Claim indices from the remaining candidate set
Claim = select_indices(Owners,
Deltas,
Indices2,
TargetN,
RingSize),
Claim = select_indices(Owners, Deltas, Indices2, TargetN, RingSize),
Claim2 = lists:sublist(Claim, Want),
NewRing = lists:foldl(fun (Idx, Ring0) ->
NewRing = lists:foldl(fun(Idx, Ring0) ->
riak_core_ring:transfer_node(Idx, Node, Ring0)
end,
Ring,
Expand Down Expand Up @@ -572,8 +568,7 @@ claim_diagonal(Wants, Owners, Params) ->
node(), integer()) -> riak_core_ring:riak_core_ring().

sequential_claim(Ring, Node, TargetN) ->
Nodes = lists:usort([Node
| riak_core_ring:claiming_members(Ring)]),
Nodes = lists:usort([Node|riak_core_ring:claiming_members(Ring)]),
NodeCount = length(Nodes),
RingSize = riak_core_ring:num_partitions(Ring),
Overhang = RingSize rem NodeCount,
Expand Down Expand Up @@ -696,8 +691,7 @@ backfill_ring(RingSize, Nodes, Remaining, Acc) ->
Node :: term()) -> ring().

claim_rebalance_n(Ring, Node) ->
Nodes = lists:usort([Node
| riak_core_ring:claiming_members(Ring)]),
Nodes = lists:usort([Node|riak_core_ring:claiming_members(Ring)]),
Zipped = diagonal_stripe(Ring, Nodes),
lists:foldl(fun ({P, N}, Acc) ->
riak_core_ring:transfer_node(P, N, Acc)
Expand Down
Loading

0 comments on commit fadf987

Please sign in to comment.