diff options
author | John DeTreville <jdetreville@vmware.com> | 2011-02-07 17:22:40 -0800 |
---|---|---|
committer | John DeTreville <jdetreville@vmware.com> | 2011-02-07 17:22:40 -0800 |
commit | ff50bb3990b48d58b533ffe86bc8a7faa18b9982 (patch) | |
tree | bdb84da5d7e1a6f89732b2d6cccd3ea83030cc35 | |
parent | e8344dabf107d074162aa786af539b9d60c09378 (diff) | |
download | rabbitmq-server-ff50bb3990b48d58b533ffe86bc8a7faa18b9982.tar.gz |
Dies in rabbit_channel:handle_info with emit_stats msg. Will fix typo in the morning. Also dies in com.rabbitmq.client.test.server.EffectVisibilityCrossNodeTest.testEffectVisibility test, but so does the default branch.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 10 | ||||
-rw-r--r-- | src/rabbit_channel.erl | 3 | ||||
-rw-r--r-- | src/rabbit_event.erl | 2 | ||||
-rw-r--r-- | src/rabbit_msg_store.erl | 2 |
5 files changed, 10 insertions, 9 deletions
@@ -110,6 +110,8 @@ $(SOURCE_DIR)/rabbit_framing_amqp_0_8.erl: codegen.py $(AMQP_CODEGEN_DIR)/amqp_c dialyze: $(BEAM_TARGETS) $(BASIC_PLT) dialyzer --plt $(BASIC_PLT) --no_native \ + -Wunmatched_returns -Werror_handling -Wbehaviours \ + -Wunderspecs \ -Wrace_conditions $(BEAM_TARGETS) # rabbit.plt is used by rabbitmq-erlang-client's dialyze make target diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index f707e3e1..2999aab2 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -224,7 +224,7 @@ stop_sync_timer(State = #q{sync_timer_ref = TRef}) -> ensure_rate_timer(State = #q{rate_timer_ref = undefined}) -> TRef = erlang:send_after( - ?RAM_DURATION_UPDATE_INTERVAL, self(), update_ram_duration), + ?RAM_DURATION_UPDATE_INTERVAL, self(), update_ram_duration), State#q{rate_timer_ref = TRef}; ensure_rate_timer(State = #q{rate_timer_ref = just_measured}) -> State#q{rate_timer_ref = undefined}; @@ -236,13 +236,13 @@ stop_rate_timer(State = #q{rate_timer_ref = undefined}) -> stop_rate_timer(State = #q{rate_timer_ref = just_measured}) -> State#q{rate_timer_ref = undefined}; stop_rate_timer(State = #q{rate_timer_ref = TRef}) -> - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), State#q{rate_timer_ref = undefined}. stop_expiry_timer(State = #q{expiry_timer_ref = undefined}) -> State; stop_expiry_timer(State = #q{expiry_timer_ref = TRef}) -> - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), State#q{expiry_timer_ref = undefined}. %% We wish to expire only when there are no consumers *and* the expiry @@ -261,9 +261,9 @@ ensure_expiry_timer(State = #q{expires = Expires}) -> end. ensure_stats_timer(State = #q { stats_timer = StatsTimer, - q = #amqqueue { pid = QPid }}) -> + q = #amqqueue { pid = QPid }}) -> State #q { stats_timer = rabbit_event:ensure_stats_timer( - StatsTimer, QPid, emit_stats) }. + StatsTimer, QPid, emit_stats) }. assert_invariant(#q{active_consumers = AC, backing_queue = BQ, backing_queue_state = BQS}) -> diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index a82e5eff..1c4c1631 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -342,8 +342,7 @@ next_state(Mask, State) -> ensure_stats_timer(State = #ch{stats_timer = StatsTimer}) -> ChPid = self(), State#ch{stats_timer = rabbit_event:ensure_stats_timer( - StatsTimer, - fun() -> emit_stats(ChPid) end)}. + StatsTimer, ChPid, emit_stats)}. return_ok(State, true, _Msg) -> {noreply, State}; return_ok(State, false, Msg) -> {reply, Msg, State}. diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl index 90b2f66c..f4ee279b 100644 --- a/src/rabbit_event.erl +++ b/src/rabbit_event.erl @@ -110,7 +110,7 @@ stop_stats_timer(State = #state{level = none}) -> stop_stats_timer(State = #state{timer = undefined}) -> State; stop_stats_timer(State = #state{timer = TRef}) -> - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), State#state{timer = undefined}. reset_stats_timer(State) -> diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index e0f05275..75ca0b8b 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -896,7 +896,7 @@ start_sync_timer(State = #msstate { sync_timer_ref = undefined }) -> stop_sync_timer(State = #msstate { sync_timer_ref = undefined }) -> State; stop_sync_timer(State = #msstate { sync_timer_ref = TRef }) -> - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), State #msstate { sync_timer_ref = undefined }. internal_sync(State = #msstate { current_file_handle = CurHdl, |