diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-10-29 17:37:36 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-10-29 17:37:36 +0000 |
commit | 799ea1088f46e3ca86e509c9b6669a1c2e9cb8da (patch) | |
tree | 43ffffd913e0e5461b64b1c469eeaccf3d061452 | |
parent | 9540b3b0dcd6c4c4ae4d5db5fae4486ab728c461 (diff) | |
download | rabbitmq-server-bug25618.tar.gz |
Remove use of gm:leave/1: it does almost nothing, master does not invoke it, and it's racy anyway.bug25618
-rw-r--r-- | src/rabbit_mirror_queue_slave.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl index 33d9e38e..ac309896 100644 --- a/src/rabbit_mirror_queue_slave.erl +++ b/src/rabbit_mirror_queue_slave.erl @@ -300,17 +300,14 @@ terminate(_Reason, #state { backing_queue_state = undefined }) -> terminate({shutdown, dropped} = R, State = #state{backing_queue = BQ, backing_queue_state = BQS}) -> %% See rabbit_mirror_queue_master:terminate/2 - %% TODO why not gm:leave()? terminate_common(State), BQ:delete_and_terminate(R, BQS); terminate(shutdown, State) -> terminate_shutdown(shutdown, State); terminate({shutdown, _} = R, State) -> terminate_shutdown(R, State); -terminate(Reason, State = #state{gm = GM, - backing_queue = BQ, +terminate(Reason, State = #state{backing_queue = BQ, backing_queue_state = BQS}) -> - ok = gm:leave(GM), terminate_common(State), BQ:delete_and_terminate(Reason, BQS); terminate([_SPid], _Reason) -> @@ -322,10 +319,8 @@ terminate([_SPid], _Reason) -> %% slave, we have no idea whether or not we'll be the only copy coming %% back up. Thus we must assume we will be, and preserve anything we %% have on disk. -terminate_shutdown(Reason, State = #state{gm = GM, - backing_queue = BQ, +terminate_shutdown(Reason, State = #state{backing_queue = BQ, backing_queue_state = BQS}) -> - ok = gm:leave(GM), terminate_common(State), BQ:terminate(Reason, BQS). |