Re: [PATCH v2] Ignore the commit_token retransmitted by upstream node on the first rotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steven Dake:

How do you think about this patch v2?

According our analysis above, I think this patch is useful.

On Mon, Dec 12, 2011 at 6:07 PM, Yunkai Zhang <qiushu.zyk@xxxxxxxxxx> wrote:
> After the representative of the new ring entered into RECOVERY state,
> it was waiting for the commit_token on the second rotation. But when
> it got a new commit_token, it didn't check the status of this token
> which could be retransmitted by upstream node on the first rotation,
> and then the representative node would send the initial ORF token
> prematurely.
>
> Signed-off-by: Yunkai Zhang <qiushu.zyk@xxxxxxxxxx>
> ---
>  exec/totemsrp.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/exec/totemsrp.c b/exec/totemsrp.c
> index 5a78962..7a4be95 100644
> --- a/exec/totemsrp.c
> +++ b/exec/totemsrp.c
> @@ -4372,7 +4372,9 @@ static int message_handler_memb_commit_token (
>                        break;
>
>                case MEMB_STATE_RECOVERY:
> -                       if (totemip_equal (&instance->my_id.addr[0], &instance->my_ring_id.rep)) {
> +                       if (totemip_equal (&instance->my_id.addr[0], &instance->my_ring_id.rep) &&
> +                               memb_commit_token->ring_id.seq == instance->my_ring_id.seq &&
> +                               memb_commit_token->token_seq == 2*memb_commit_token->addr_entries) {
>                                log_printf (instance->totemsrp_log_level_debug,
>                                        "Sending initial ORF token\n");
>
> --
> 1.7.7.3
>



-- 
Yunkai Zhang
Work at Taobao
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss



[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux