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 | 851bf5a58ca22f15f204c483e493ccfe1ce7fee9 (patch) | |
| tree | 43ffffd913e0e5461b64b1c469eeaccf3d061452 | |
| parent | 5b3ce06996f3825013227bf603149182b64f1225 (diff) | |
| download | rabbitmq-server-git-851bf5a58ca22f15f204c483e493ccfe1ce7fee9.tar.gz | |
Remove use of gm:leave/1: it does almost nothing, master does not invoke it, and it's racy anyway.
| -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 33d9e38efc..ac3098969f 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). |
