diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-02 10:59:50 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-02 10:59:50 +0100 |
| commit | 398680a13aaa5f16c158a3bc071f13eb12f6781a (patch) | |
| tree | ac6eb1fcae13a44dccda70d7bf6d5549b0bcc4e9 /src | |
| parent | 48f534edd07a5b9229cf0962eac9b10837c5b359 (diff) | |
| parent | 7a3ffda8e1f4de1bc52b79c2ca48985b4c78a17f (diff) | |
| download | rabbitmq-server-git-398680a13aaa5f16c158a3bc071f13eb12f6781a.tar.gz | |
stable to default
Diffstat (limited to 'src')
| -rw-r--r-- | src/gm.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gm.erl b/src/gm.erl index fb59b9cb0b..7a2f5835b0 100644 --- a/src/gm.erl +++ b/src/gm.erl @@ -732,8 +732,21 @@ code_change(_OldVsn, State, _Extra) -> prioritise_info(flush, _Len, _State) -> 1; +%% DOWN messages should not overtake initial catchups; if they do we +%% will receive a DOWN we do not know what to do with. prioritise_info({'DOWN', _MRef, process, _Pid, _Reason}, _Len, - #state { members_state = MS }) when MS /= undefined -> + #state { members_state = undefined }) -> + 0; +%% We should not prioritise DOWN messages from our left since +%% otherwise the DOWN can overtake any last activity from the left, +%% causing that activity to be lost. +prioritise_info({'DOWN', _MRef, process, LeftPid, _Reason}, _Len, + #state { left = {{_LeftVer, LeftPid}, _MRef2} }) -> + 0; +%% But prioritise all other DOWNs - we want to make sure we are not +%% sending activity into the void for too long because our right is +%% down but we don't know it. +prioritise_info({'DOWN', MRef, process, Pid, _Reason}, _Len, _State) -> 1; prioritise_info(_, _Len, _State) -> 0. |
