Skip to content

Commit

Permalink
Fix compatibility with OTP 26
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed May 25, 2024
1 parent 82560f5 commit 9b1ef6d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ doc
docs
/priv/plts
/bench
rebar3
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
erlang 26.2
10 changes: 10 additions & 0 deletions src/shards.erl
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,15 @@ maybe_register(Name, Pid, Options) ->
ok
end.

-ifndef(OTP_RELEASE).
%% OTP 20 or lower.
-define(OTP_RELEASE, 20).
-endif.

-if(?OTP_RELEASE >= 26).
%% @private
wrap_exit() -> ok.
-else.
%% @private
wrap_exit() ->
% We wait for the 'EXIT' signal from the partition supervisor knowing
Expand All @@ -978,6 +987,7 @@ wrap_exit() ->
receive
{'EXIT', _Pid, _Reason} -> ok
end.
-endif.

%% @equiv next(Tab, Key1, shards_meta:get(Tab))
next(Tab, Key1) ->
Expand Down
15 changes: 0 additions & 15 deletions test/shards_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@
t_table_creation_errors/1
]).

% %% Test Cases Helpers
% -export([
% t_basic_ops_/1,
% t_match_ops_/1,
% t_select_ops_/1
% ]).

% %% Helpers
% -export([
% init_shards/0,
% init_shards/1,
% cleanup_shards/0,
% delete_shards/0
% ]).

-define(EXCLUDED_FUNS, [
module_info,
all,
Expand Down

0 comments on commit 9b1ef6d

Please sign in to comment.