aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_controller.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-06-04 09:21:02 +0000
committerErlang/OTP <[email protected]>2010-06-04 09:21:02 +0000
commitfa66eb731b85726970cc4c581d32ebdc2ebb965e (patch)
tree4ab7aa8da61928110ca19b65f6ce8129a3dffbcf /lib/mnesia/src/mnesia_controller.erl
parentcd629d29d680304014e0b54c409a2b92c21e8938 (diff)
parent82c090488eb76d16e8b828bb8f050afd0949e4c4 (diff)
downloadotp-fa66eb731b85726970cc4c581d32ebdc2ebb965e.tar.gz
otp-fa66eb731b85726970cc4c581d32ebdc2ebb965e.tar.bz2
otp-fa66eb731b85726970cc4c581d32ebdc2ebb965e.zip
Merge branch 'uw/mnesia-overload' into dev
* uw/mnesia-overload: Enable continuous monitoring of mnesia overload status
Diffstat (limited to 'lib/mnesia/src/mnesia_controller.erl')
-rw-r--r--lib/mnesia/src/mnesia_controller.erl25
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 95589e7a3a..0298b382a6 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -1849,17 +1849,20 @@ reply(ReplyTo, Reply) ->
add_worker(Worker = #dump_log{}, State) ->
InitBy = Worker#dump_log.initiated_by,
Queue = State#state.dumper_queue,
- case lists:keymember(InitBy, #dump_log.initiated_by, Queue) of
- true when Worker#dump_log.opt_reply_to == undefined ->
- %% The same threshold has been exceeded again,
- %% before we have had the possibility to
- %% process the older one.
- DetectedBy = {dump_log, InitBy},
- Event = {mnesia_overload, DetectedBy},
- mnesia_lib:report_system_event(Event);
- _ ->
- ignore
- end,
+ Status =
+ case lists:keymember(InitBy, #dump_log.initiated_by, Queue) of
+ true when Worker#dump_log.opt_reply_to == undefined ->
+ %% The same threshold has been exceeded again,
+ %% before we have had the possibility to
+ %% process the older one.
+ DetectedBy = {dump_log, InitBy},
+ Event = {mnesia_overload, DetectedBy},
+ mnesia_lib:report_system_event(Event),
+ true;
+ _ ->
+ false
+ end,
+ mnesia_recover:log_dump_overload(Status),
Queue2 = Queue ++ [Worker],
State2 = State#state{dumper_queue = Queue2},
opt_start_worker(State2);