forked from basho/riak_core
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Applied all the patches as in the riak_core with partisan variant at https://github.com/lasp-lang/riak_core/tree/partisan-support-r21 Some unit tests are still failing (worker_pool_test, riak_core_claim_sim), unclear why.
- Loading branch information
Showing
14 changed files
with
241 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
{"1.1.0", | ||
[{<<"poolboy">>,{pkg,<<"poolboy">>,<<"1.5.2">>},0}]}. | ||
[{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},1}, | ||
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},2}, | ||
{<<"lager">>,{pkg,<<"lager">>,<<"3.8.0">>},1}, | ||
{<<"partisan">>, | ||
{git,"https://github.com/lasp-lang/partisan", | ||
{ref,"b122d73d664ae7259438d3c9c4e93d34becec08a"}}, | ||
0}, | ||
{<<"poolboy">>,{pkg,<<"poolboy">>,<<"1.5.2">>},0}, | ||
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.7.5">>},2}, | ||
{<<"riak_core_partisan_utils">>, | ||
{git,"https://github.com/lasp-lang/riak_core_partisan_utils", | ||
{ref,"c1e4941a60796dcf754c7eb9df61fb17b1c5498e"}}, | ||
0}, | ||
{<<"types">>,{pkg,<<"types">>,<<"0.1.8">>},1}, | ||
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.7.5">>},1}]}. | ||
[ | ||
{pkg_hash,[ | ||
{<<"poolboy">>, <<"392B007A1693A64540CEAD79830443ABF5762F5D30CF50BC95CB2C1AAAFA006B">>}]} | ||
{<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>}, | ||
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>}, | ||
{<<"lager">>, <<"3402B9A7E473680CA179FC2F1D827CAB88DD37DD1E6113090C6F45EF05228A1C">>}, | ||
{<<"poolboy">>, <<"392B007A1693A64540CEAD79830443ABF5762F5D30CF50BC95CB2C1AAAFA006B">>}, | ||
{<<"quickrand">>, <<"E3086A153EB13A057FC19192D05E2D4C6BB2BDBB55746A699BEAE9847AC17CA8">>}, | ||
{<<"types">>, <<"5782B67231E8C174FE2835395E71E669FE0121076779D2A09F1C0D58EE0E2F13">>}, | ||
{<<"uuid">>, <<"3862FF9A21C42566DFD0376B97512FA202922897129E09A05E2AFA0D9CAFD97A">>}]} | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
%% ------------------------------------------------------------------- | ||
%% | ||
%% Copyright (c) 2017 Christopher S. Meiklejohn. All Rights Reserved. | ||
%% | ||
%% This file is provided to you under the Apache License, | ||
%% Version 2.0 (the "License"); you may not use this file | ||
%% except in compliance with the License. You may obtain | ||
%% a copy of the License at | ||
%% | ||
%% http://www.apache.org/licenses/LICENSE-2.0 | ||
%% | ||
%% Unless required by applicable law or agreed to in writing, | ||
%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
%% KIND, either express or implied. See the License for the | ||
%% specific language governing permissions and limitations | ||
%% under the License. | ||
%% | ||
%% ------------------------------------------------------------------- | ||
|
||
-module(riak_core_partisan_proxy_service). | ||
-author("Christopher S. Meiklejohn <christopher.meiklejohn@gmail.com>"). | ||
|
||
-behaviour(gen_server). | ||
|
||
%% API | ||
-export([start_link/0, | ||
start_link/1]). | ||
|
||
%% gen_server callbacks | ||
-export([init/1, | ||
handle_call/3, | ||
handle_cast/2, | ||
handle_info/2, | ||
terminate/2, | ||
code_change/3]). | ||
|
||
%% State record. | ||
-record(state, {}). | ||
|
||
%%%=================================================================== | ||
%%% API | ||
%%%=================================================================== | ||
|
||
%% @doc Same as start_link([]). | ||
-spec start_link() -> {ok, pid()} | ignore | {error, term()}. | ||
start_link() -> | ||
start_link([]). | ||
|
||
%% @doc Start and link to calling process. | ||
-spec start_link(list())-> {ok, pid()} | ignore | {error, term()}. | ||
start_link(Opts) -> | ||
gen_server:start_link({local, ?MODULE}, ?MODULE, Opts, []). | ||
|
||
%%%=================================================================== | ||
%%% gen_server callbacks | ||
%%%=================================================================== | ||
|
||
%% @private | ||
-spec init([]) -> {ok, #state{}}. | ||
init([]) -> | ||
{ok, #state{}}. | ||
|
||
%% @private | ||
-spec handle_call(term(), {pid(), term()}, #state{}) -> | ||
{reply, term(), #state{}}. | ||
|
||
%% @private | ||
handle_call(Msg, _From, State) -> | ||
_ = logger:warning("Unhandled messages: ~p", [Msg]), | ||
{reply, ok, State}. | ||
|
||
-spec handle_cast(term(), #state{}) -> {noreply, #state{}}. | ||
%% @private | ||
handle_cast(Msg, State) -> | ||
_ = logger:warning("Unhandled messages: ~p", [Msg]), | ||
{noreply, State}. | ||
|
||
%% @private | ||
handle_info({forward, Pid, Message}, State) -> | ||
erlang:send(Pid, Message), | ||
{noreply, State}; | ||
handle_info(Msg, State) -> | ||
_ = logger:warning("Unhandled messages: ~p", [Msg]), | ||
{noreply, State}. | ||
|
||
%% @private | ||
-spec terminate(term(), #state{}) -> term(). | ||
terminate(_Reason, _State) -> | ||
ok. | ||
|
||
%% @private | ||
-spec code_change(term() | {down, term()}, #state{}, term()) -> | ||
{ok, #state{}}. | ||
code_change(_OldVsn, State, _Extra) -> | ||
{ok, State}. | ||
|
||
%%%=================================================================== | ||
%%% Internal functions | ||
%%%=================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.