You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/04/11 16:33:45 UTC
[couchdb] branch 63012-scheduler updated: [fixup] make stats
updater crash on unknown message
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 63012-scheduler
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/63012-scheduler by this push:
new 3210fbf [fixup] make stats updater crash on unknown message
3210fbf is described below
commit 3210fbfac1f548435e6ee149fcdafae3464cdee2
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Tue Apr 11 12:33:36 2017 -0400
[fixup] make stats updater crash on unknown message
---
src/couch_replicator/src/couch_replicator_scheduler.erl | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/couch_replicator/src/couch_replicator_scheduler.erl b/src/couch_replicator/src/couch_replicator_scheduler.erl
index 2279b90..d75b5bd 100644
--- a/src/couch_replicator/src/couch_replicator_scheduler.erl
+++ b/src/couch_replicator/src/couch_replicator_scheduler.erl
@@ -863,11 +863,8 @@ stats_updater_loop() ->
update_stats ->
erlang:send_after(?STATS_UPDATE_WAIT, self(), refresh_stats),
stats_updater_pending_refresh_loop();
- OtherMsg ->
- % Only accept update_state, discard stray messaes and log as error
- couch_log:error("~p Invalid message received by stats updater ~p",
- [?MODULE, OtherMsg]),
- stats_updater_loop()
+ Msg ->
+ exit({bad_stats_updater_message, Msg})
end.
@@ -879,11 +876,8 @@ stats_updater_pending_refresh_loop() ->
update_stats ->
% Ignore update_stats here, refresh already scheduled
stats_updater_pending_refresh_loop();
- OtherMsg ->
- % Any messages are logged as error as they are not expected
- couch_log:error("~p Invalid message received by stats updater ~p",
- [?MODULE, OtherMsg]),
- stats_updater_pending_refresh_loop()
+ Msg ->
+ exit({bad_stats_updater_message, Msg})
end.
--
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].