[jboss-jira] [JBoss JIRA] (JGRP-1461) SEQUENCER leaks sequence numbers

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu May 10 03:32:17 EDT 2012


    [ https://issues.jboss.org/browse/JGRP-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12691677#comment-12691677 ] 

Bela Ban commented on JGRP-1461:
--------------------------------

Hmm... I think the logic of queueing seqnos in SeqnoTable.Entry is wrong. If we get sequence 5,6,8,7,9 and next_to_receive is 5, then:
- 5 and 6 are delivered, next_to_receive=7
- 8 is queued but *delivered* because the seqnos set doesn't have it; this is incorrect !
- 7 is delivered, 8 is removed from seqnos
- 9 is delivered, next_to_receive is 10
--> Delivering 8 before 7 is incorrect... however, I don't think this can happen: as SEQUENCER requires a FIFO multicast protocol such as NAKACK or NAKACK2 below it, seqnos will *always* arrive in the right sequence !
What *can* happen though is that a seqno can be delivered twice, e.g. when there's a failover from coord A to B: if C sent seqno 5,6 and 7 to A, and A crashed, then it will resend 5-7 to B. If B broadcasts 5-7, those members that did receive (perhaps) 5, that A managed to broadcast before it dies, will get a duplicate 5 and need to discard it.

Because we do receive all seqnos in order, I think we only need to maintain next_to_receive and advance it on message reception. If a seqno is < next_to_receive, we discard it. This way, we can discard the seqnos set.

                
> SEQUENCER leaks sequence numbers
> --------------------------------
>
>                 Key: JGRP-1461
>                 URL: https://issues.jboss.org/browse/JGRP-1461
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.0.9, 3.1
>            Reporter: David Hotham
>            Assignee: Bela Ban
>             Fix For: 3.0.10, 3.1
>
>
> As noted in JGRP-1458, it looks as though SEQUENCER always thinks that sequence numbers must start at zero.  But a member who joins a group after some messages have already been broadcast may never receive sequence number zero.  So, I think, his SeqnoTable will grow indefinitely.
> Note that this one's mostly through code reading.  I think I'm right; but I'm happy to be told otherwise!
> Pull request to follow shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list