At Sun, 29 Jul 2012 03:42:45 +0800,
Yunkai Zhang wrote:
> 
> From: Yunkai Zhang <[email protected]>
> 
> Since sheeps in delayed_nodes list won't cause recovery when the cluster in
> WAIT_FOR_JOIN state, it's safe to put sheeps with smaller epoch into
> delayed_nodes list, regardless of whether it once belonged to the cluster.
> 
> Benifit from this change, we needn't to restart sheep in the following 
> scenario:
> 
> 1) Start [0,1,2,3] sheeps:
>    epoch of [0,1,2,3] sheeps = 1
> 
> 2) Kill [0] sheep, and then Shutdown [1,2,3] sheeps
>    epoch of [0] sheep      = 1
>    epoch of [1,2,3] sheeps = 2
> 
> 3) Start [1,2] sheeps:
>    epoch of [0] sheep      = 1
>    epoch of [1,2,3] sheeps = 2
>    cluster status = WAIT_FOR_JOIN (waits [3] sheep)
> 
> 4) Start [0] sheep:
>    [0] sheep will be added into delayed_nodes list, needn't to restart
>    epoch of [0] sheep      = 1
>    epoch of [1,2,3] sheeps = 2
>    cluster status = WAIT_FOR_JOIN (waits [3] sheep)
> 
> 5) Start [3] sheep:
>    epoch of [0,1,2,3] sheeps = 3
>    cluster status = OK
>    Now cluster start working...
> 
> Signed-off-by: Yunkai Zhang <[email protected]>
> ---
>  sheep/group.c | 5 -----
>  1 file changed, 5 deletions(-)

Applied, thanks!

Kazutaka
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to