Skip to content
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

OTP 24 support - no lager dependency #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ partisan_config:set(partisan_peer_service_manager, partisan_hyparview_peer_servi

Available options are: ```partisan_client_server_peer_service_manager```, ```partisan_default_peer_service_manager``` or ```partisan_hyparview_peer_service_manager```.

### Configuration

In necessary configure the `partisan` with `pid_encoding` to `false` for working
with the `pid()`.

#### erlang conf:

```erlang
{partisan, [
{pid_encoding, false},
]},
```

#### elixir conf:

```elixir
config :partisan,
pid_encoding: false
```

## Replication

Lasp PG uses the underlying Lasp KV store, which only has in-memory
Expand Down
4 changes: 3 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{deps, [{lasp, "~>0.4"}]}.
{deps, [
{lasp, {git, "https://github.com/Inkwell-Data/lasp.git", {branch, "no_lager"}}}
]}.

{dialyzer_base_plt_apps, [kernel, stdlib, erts, sasl, eunit, syntax_tools, compiler, crypto]}.
{xref_checks, [undefined_function_calls]}.
Expand Down
59 changes: 36 additions & 23 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
{"1.1.0",
[{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0-rc.0">>},2},
{<<"gen_flow">>,{pkg,<<"gen_flow">>,<<"0.0.4">>},1},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.5.2">>},1},
{<<"lasp">>,{pkg,<<"lasp">>,<<"0.4.0">>},0},
{<<"lasp_support">>,{pkg,<<"lasp_support">>,<<"0.0.3">>},1},
{<<"partisan">>,{pkg,<<"partisan">>,<<"1.1.0">>},1},
{<<"plumtree">>,{pkg,<<"plumtree">>,<<"0.4.0">>},1},
{<<"rand_compat">>,{pkg,<<"rand_compat">>,<<"0.0.3">>},1},
{<<"time_compat">>,{pkg,<<"time_compat">>,<<"0.0.1">>},1},
{<<"types">>,{pkg,<<"types">>,<<"0.1.6">>},1}]}.
{"1.2.0",
[{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},2},
{<<"gen_flow">>,{pkg,<<"gen_flow">>,<<"0.0.5">>},1},
{<<"gen_fsm_compat">>,{pkg,<<"gen_fsm_compat">>,<<"0.3.0">>},1},
{<<"lasp">>,
{git,"https://github.com/Inkwell-Data/lasp.git",
{ref,"b4164b366fe1a64c54cc97ee4e3417363a7583f4"}},
0},
{<<"lasp_support">>,{pkg,<<"lasp_support">>,<<"0.1.0">>},1},
{<<"partisan">>,
{git,"https://github.com/Inkwell-Data/partisan.git",
{ref,"adc508aee5d1fde11146b5fc3f59b4b8f326ceba"}},
1},
{<<"plumtree">>,
{git,"https://github.com/Inkwell-Data/plumtree.git",
{ref,"f7fb3da55ba2bea8e84224dc1eedbc333ee97c85"}},
1},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.2">>},3},
{<<"types">>,
{git,"https://github.com/Inkwell-Data/types.git",
{ref,"8cfaeb1bd7a0983db62d1ed3129e7cab91239ff6"}},
1},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.2">>},2}]}.
[
{pkg_hash,[
{<<"acceptor_pool">>, <<"679D741DF87FC13599B1AEF2DF8F78F1F880449A6BEFAB7C44FB6FAE0E92A2DE">>},
{<<"gen_flow">>, <<"E5F401967B2EE073EA4635AC8E98CC68139115473B036CC7220BB62AE4A78F2C">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"lager">>, <<"614A8C8F67BF99B69EB264EA22121AD25511C055AAEC09B086773D5108C6767F">>},
{<<"lasp">>, <<"8A0CF2B24C797E12BF7522DA827CD5531173F65B213BCCC4C300328E51173408">>},
{<<"lasp_support">>, <<"C1B7E1A472037AE82C71D2D16A10B7D644A621B66AE5AFE834CECF170F2E9169">>},
{<<"partisan">>, <<"E09515027D185295244F0F437208DD95DF8AFB3C94E98BD05448AB7E2BBE178F">>},
{<<"plumtree">>, <<"14E9E28C81FA03F1BDC544EA27BD1969E66ED106725A5042DAA40C5F7B246DBF">>},
{<<"rand_compat">>, <<"011646BC1F0B0C432FE101B816F25B9BBB74A085713CEE1DAFD2D62E9415EAD3">>},
{<<"time_compat">>, <<"23FE0AD1FDF3B5B88821B2D04B4B5E865BF587AE66056D671FE0F53514ED8139">>},
{<<"types">>, <<"03BB7140016C896D3441A77CB0B7D6ACAA583D6D6E9C4A3E1FD3C25123710290">>}]}
{<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>},
{<<"gen_flow">>, <<"2FF6ABE3ED1C5C9BC41F81BF09364A3F63F96E4D378D45A2A2DDC4FC06F3484A">>},
{<<"gen_fsm_compat">>, <<"5903549F67D595F58A7101154CBE0FDD46955FBFBE40813F1E53C23A970FF5F4">>},
{<<"lasp_support">>, <<"A6D665138BD8C10555FE7A4A2A81A8A47079EAE5FFC368D411DE660EB7A66F04">>},
{<<"quickrand">>, <<"1D73FAA52E0C149FCBC72A63C26135FF68BE8FA7870675C73645896788A7540C">>},
{<<"uuid">>, <<"0D1CA9D94CA3B058467BCE20B7706CC816A2BDBBE0574DD008936AE97EA4EBE7">>}]},
{pkg_hash_ext,[
{<<"acceptor_pool">>, <<"0CBCD83FDC8B9AD2EEE2067EF8B91A14858A5883CB7CD800E6FCD5803E158788">>},
{<<"gen_flow">>, <<"AA139C67942475A08B73D754587FFD4694CE92A149A26D16DDB16EBD6CC19EB4">>},
{<<"gen_fsm_compat">>, <<"7153D11BAD328933D4B24E663D8CEC52874E14176C7FB392FA1FF768B17460D9">>},
{<<"lasp_support">>, <<"D57A85BA77607BB097CE4B9DD233E29C98C4824468D1A7BE06C9C6C15D8618F8">>},
{<<"quickrand">>, <<"E21C6C7F29CA995468662085CA54D7D09E861C180A9DFEC2CF4A2E75364A16D6">>},
{<<"uuid">>, <<"4866CA7B3BD0265BC371590DCD0FE2832FC08588A071B72D07E09E23F163D0D6">>}]}
].
Binary file removed rebar3
Binary file not shown.
9 changes: 1 addition & 8 deletions test/lasp_pg_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ start(_Case, Config, Options) ->
false),
application:start(sasl),

%% Load lager.
{ok, _} = application:ensure_all_started(lager),

Servers = proplists:get_value(servers, Options, []),
Clients = proplists:get_value(clients, Options, []),
Expand Down Expand Up @@ -300,7 +298,6 @@ start(_Case, Config, Options) ->
ct:pal("Loading applications on node: ~p", [Node]),

PrivDir = code:priv_dir(?APP),
NodeDir = filename:join([PrivDir, "lager", Node]),

%% Manually force sasl loading, and disable the logger.
ok = rpc:call(Node, application, load, [sasl]),
Expand All @@ -309,14 +306,10 @@ start(_Case, Config, Options) ->
ok = rpc:call(Node, application, start, [sasl]),

ok = rpc:call(Node, application, load, [partisan]),
ok = rpc:call(Node, application, load, [lager]),
ok = rpc:call(Node, application, load, [lasp_pg]),
ok = rpc:call(Node, application, set_env, [sasl,
sasl_error_logger,
false]),
ok = rpc:call(Node, application, set_env, [lager,
log_root,
NodeDir])
false])
end,
lists:map(LoaderFun, Nodes),

Expand Down