Permalink
Browse files

GMT BZ28931: fix scavenger to abort if any error happens during step4…

…; change log level to ALERT (APPLOG_APPM_109); fix log format string bug
  • Loading branch information...
1 parent a6da1ef commit 64b19f458e8a8c6687e26cb306766f20671f2644 @norton norton committed Aug 6, 2010
Showing with 9 additions and 3 deletions.
  1. +6 −0 priv/applog.hrl
  2. +3 −3 src/gmt_hlog_common.erl
View
@@ -739,4 +739,10 @@
%
-define(APPLOG_APPM_108, ?APPLOG_GDSS_APPM(108)).
+% @doc cause disk error happen on scavenger processing.
+% @doc effect abort the scavenger process
+% @doc action repair the error cause
+% @doc monitor Yes
+%
+-define(APPLOG_APPM_109, ?APPLOG_GDSS_APPM(109)).
View
@@ -1171,10 +1171,10 @@ scavenger_commonlog(SA) ->
erlang:garbage_collect(),
[{brick_ets:temp_path_to_seqnum(Path2), Bytes}|Acc]
catch Err1:Err2 ->
- ?E_ERROR("SCAV: ~p error processing ~s: ~p ~p at ~p\n",
- [SA#scav.name, Err1, Err2,
+ ?APPLOG_ALERT(?APPLOG_APPM_109, "SCAV: ~p error processing ~s: ~p ~p at ~p\n",
+ [SA#scav.name, Path, Err1, Err2,
erlang:get_stacktrace()]),
- Acc
+ exit(abort)
end
end,
%% Do this next step in a child process, to try to avoid some

0 comments on commit 64b19f4

Please sign in to comment.