[corosync] Why we send downlist and joinlist separately?

Angus Salkeld asalkeld at redhat.com
Thu Nov 3 09:37:22 GMT 2011


On Thu, Nov 03, 2011 at 02:18:52PM +0800, Yunkai Zhang wrote:
> Hi Angus:
> 
> I found that corosync sends downlist(​​alias leftlist in CPG) and
> joinlist separately to CPG client after a new ring established.
> 
> When a node lefts from or joins into a ring, only downlist or joinlist
> contain content, this behavior seems not strange.
> 
> But suppose there are two ring: Ring(A,B), Ring(C,D,E,F) that are
> forming into a new ring, and these nodes: B,E,F dropped in the GATHER
> state, then only these nodes: A,C,D will form the new Ring(A,C,D). And
> corosync will send downlist(B) and joinlist(C,D) as two confchg events
> to the CPG client of node A. This will make CPG client confused.
> 
> The correct way is that send _Only_ one confchg event containing both
> downlist and joinlist to the CPG client. In this case,
> 1) The CPG client of A should receive only one confchg as following:
> memb:A,C,D       left:B         join:C,D
> 
> 2) The CPG client of C,D should receive only one confchg as following:
> memb:A,C,D       left:E,F       join:A
> 
> Angus, what is your opinion?
> 
> If you agree with me, I would summit patch to fix it.

Sure it would be better to have one event, just try leave
cpg.c simpler and clearer than when you found it (it has a tendancy of getting
more and more complex). Not always possible, but something to aim for.

-Angus

> 
> -- 
> Yunkai Zhang
> Work at Taobao


More information about the discuss mailing list