Skip to content

Commit d9f6f13

Browse files
committed
mnesia
1 parent b69510d commit d9f6f13

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

deps/rabbit/src/rabbit_mnesia.erl

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
status/0,
2727
is_running/0,
2828
is_clustered/0,
29-
on_running_node/1,
30-
is_process_alive/1,
31-
is_registered_process_alive/1,
3229
cluster_nodes/1,
3330
node_type/0,
3431
is_virgin_node/0,
@@ -81,13 +78,6 @@
8178

8279
-export([check_reset_gracefully/0]).
8380

84-
-deprecated({on_running_node, 1,
85-
"Use rabbit_process:on_running_node/1 instead"}).
86-
-deprecated({is_process_alive, 1,
87-
"Use rabbit_process:is_process_alive/1 instead"}).
88-
-deprecated({is_registered_process_alive, 1,
89-
"Use rabbit_process:is_registered_process_alive/1 instead"}).
90-
9181
-ifdef(TEST).
9282
-compile(export_all).
9383
-endif.
@@ -369,29 +359,6 @@ is_running() -> mnesia:system_info(is_running) =:= yes.
369359
is_clustered() -> AllNodes = cluster_nodes(all),
370360
AllNodes =/= [] andalso AllNodes =/= [node()].
371361

372-
-spec on_running_node(pid()) -> boolean().
373-
374-
on_running_node(Pid) -> lists:member(node(Pid), cluster_nodes(running)).
375-
376-
%% This requires the process be in the same running cluster as us
377-
%% (i.e. not partitioned or some random node).
378-
%%
379-
%% See also rabbit_misc:is_process_alive/1 which does not.
380-
381-
-spec is_process_alive(pid() | {atom(), node()}) -> boolean().
382-
383-
is_process_alive(Pid) when is_pid(Pid) ->
384-
on_running_node(Pid) andalso
385-
rpc:call(node(Pid), erlang, is_process_alive, [Pid]) =:= true;
386-
is_process_alive({Name, Node}) ->
387-
lists:member(Node, cluster_nodes(running)) andalso
388-
rpc:call(Node, rabbit_mnesia, is_registered_process_alive, [Name]) =:= true.
389-
390-
-spec is_registered_process_alive(atom()) -> boolean().
391-
392-
is_registered_process_alive(Name) ->
393-
is_pid(whereis(Name)).
394-
395362
-spec cluster_nodes('all' | 'disc' | 'ram' | 'running') -> [node()];
396363
('status') -> {[node()], [node()], [node()]}.
397364

0 commit comments

Comments
 (0)