Skip to content

Commit ace2143

Browse files
committed
Fix OTP20 incompatibilities
nowarn_export_all, random -> rand, gen_fsm -> gen_fsm_compat, now -> os:timestamp, rand_bytes -> strong_rand_bytes
1 parent c1a6273 commit ace2143

File tree

104 files changed

+287
-312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+287
-312
lines changed

intercepts/hashtree_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(hashtree_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424

2525
sleep_update_perform(State) ->

intercepts/init_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(init_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424
-define(M, init_orig).
2525

intercepts/intercept.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
%% because some of these private functions are useful in their own
2424
%% right.
2525
-export([add/3, add/4, clean/1]).
26-
-compile(export_all).
26+
-compile([export_all, nowarn_export_all]).
2727

2828
-type abstract_code() :: term().
2929
-type form() :: term().

intercepts/riak_core_broadcast_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(riak_core_broadcast_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424

2525
global_send(Msg, Peers) when is_list(Peers) ->

intercepts/riak_core_connection_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(riak_core_connection_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424

2525
-define(M, riak_core_connection_orig).

intercepts/riak_core_console_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
%
1919
%% -------------------------------------------------------------------
2020
-module(riak_core_console_intercepts).
21-
-compile(export_all).
21+
-compile([export_all, nowarn_export_all]).
2222
-include("intercept.hrl").
2323

2424
%% See tests/riak_admin_console_tests.erl for more info

intercepts/riak_core_handoff_sender_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(riak_core_handoff_sender_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424
-define(M, riak_core_handoff_sender_orig).
2525

intercepts/riak_core_ring_manager_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(riak_core_ring_manager_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424

2525
noop_ring_trans(_Fun, _Args) ->

intercepts/riak_core_vnode_master_intercepts.erl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%%-------------------------------------------------------------------
2020

2121
-module(riak_core_vnode_master_intercepts).
22-
-compile(export_all).
22+
-compile([export_all, nowarn_export_all]).
2323
-include("intercept.hrl").
2424

2525
-record(riak_core_fold_req_v2, {
@@ -37,8 +37,7 @@ stop_vnode_after_bloom_fold_request_succeeds(IndexNode, Req, Sender, VMaster) ->
3737

3838
case (ReqFun == fun riak_repl_aae_source:bloom_fold/3 orelse ReqFun == fun riak_repl_keylist_server:bloom_fold/3) of
3939
true ->
40-
random:seed(erlang:now()),
41-
case random:uniform(10) of
40+
case rand:uniform(10) of
4241
5 ->
4342
%% Simulate what happens when a VNode completes handoff between command_returning_vnode
4443
%% and the fold attempting to start - other attempts to intercept and slow
@@ -52,4 +51,4 @@ stop_vnode_after_bloom_fold_request_succeeds(IndexNode, Req, Sender, VMaster) ->
5251
?M:command_return_vnode_orig(IndexNode, Req, Sender, VMaster)
5352
end;
5453
false -> ?M:command_return_vnode_orig(IndexNode, Req, Sender, VMaster)
55-
end.
54+
end.

intercepts/riak_core_vnode_proxy_intercepts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
%%-------------------------------------------------------------------
1919

2020
-module(riak_core_vnode_proxy_intercepts).
21-
-compile(export_all).
21+
-compile([export_all, nowarn_export_all]).
2222
-include("intercept.hrl").
2323
-define(M, riak_core_vnode_proxy_orig).
2424

0 commit comments

Comments
 (0)