When we have coord A and B, the following can happen:
- A joins: view=A|0
- B joins: view=A|1
- A leaves, view B|2 should be multicast by A to B
--> B|2 is never received by B. B has to wait until failure detection detects that A is absent and installs a new view
--> This is not incorrect, but takes more time than A installing the last view B|2 before it leaves
The reason is that CoordGmsImpl.leave() sets leaving to true, which changes the impl from CoordGmsImpl to ClientGmsImpl. However, the latter doesn't handle the LEAVE request.
SOLUTION:
- Instead of using field leaving, use a (stack-based) variable is_leaving in handleMembershipChange().