akka/akka — pull request #1348 by patriknw (2013-04-19 05:57:40+00:00)
Title: Change member prio for Joining/Up, see #3239

* Sometimes caused duplicate MemberUp events, after conflicting gossips

This is what is going on:

first: first join first
members=[first:J] vclock=[first:1]

first: second join first
members=[first:J, second:J] vclock=[first:2]

first: third join first
members=[first:J, second:J, third:J] vclock=[first:3]

second: leader actions second -> Up, first -> Up
(note that third is not here yet)
members=[first:U, second:U] vclock=[first:2, second:1]

second: receive gossip from first
merge conflict
expected merged result: members=[first:U, second:U, third:J] vclock=[first:3, second:1]
but got merged result: members=[first:J, second:J, third:J] vclock=[first:3, second:1]

second: leader actions second -> Up, first -> Up, third -> Up
members=[first:U, second:U, third:U] vclock=[first:3, second:2]

WHAT, why are Joining higher priority than Up?

The reason was probably to support the previous (broken) re-joining.