[jboss-jira] [JBoss JIRA] Commented: (JGRP-1099) NAKACK: don't send retransmission requests individually

Bela Ban (JIRA) jira-events at lists.jboss.org
Fri Nov 13 06:17:05 EST 2009


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

Bela Ban commented on JGRP-1099:
--------------------------------

A range could be implemented via a BitSet and a low and high. For example, when the range is 3-20, we create a BitSet of 18 (by default 1 long is allocated, which is 64 bits). When we receive a message in that range, we set the corresponding bit, e.g. seqno #10 would set bit 13 in the set (10 + offset of 3).

To get the ranges for retransmisson, we could run the following code below (method printRanges()):

 public static void main(String[] args) throws IOException, ChannelException {
        BitSet set=new BitSet(20);
        set.flip(0);
        set.flip(3);
        set.flip(8); set.flip(9); set.flip(10);
        set.flip(15);
        set.flip(130);
        System.out.println("set = " + set);
        printRanges(set, 20);
    }

    private static void printRanges(BitSet set, int capacity) {
        int index=0;
        int start_range=0, end_range=0;

        while(index < capacity) {
            start_range=set.nextClearBit(index);
            if(start_range < 0)
                break;
            end_range=set.nextSetBit(start_range);
            if(end_range < 0) {
                System.out.println("[" + start_range + " - " + capacity + "]");
                break;
            }
            System.out.println("[" + start_range + " - " + (end_range-1) + "]");
            index=end_range;
        }
    }


> NAKACK: don't send retransmission requests individually
> -------------------------------------------------------
>
>                 Key: JGRP-1099
>                 URL: https://jira.jboss.org/jira/browse/JGRP-1099
>             Project: JGroups
>          Issue Type: Task
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 2.9
>
>
> Currently, when we have messages 1,2 from P and receive 11, then we
> - Add message 11 to the NakReceiverWindow
> - This causes messages 3-10 to be added to the Retransmitter
> These messages are added *individually*, so we have 7 new tasks in the Retransmitter. This also means we send 7 retransmission requests rather than 1 !
> Because retransmission requests are sent as OOB messages, they won't get bundled (see [1]) ! Same for the retransmission responses (for OOB messages); they won't get bundled.
> Disadvantages: 
> #1 We send 7 retransmission messages rather than 1. This could be mitigated if OOB messages were bundled though...
> #2 We have 7 rather than 1 additional tasks in the Retransmitter. This taxes the DelayQueue [2] used by the 
>      ScheduledThreadPoolExecutor used by the Retransmitter
> SOLUTION: go back to the old scheme of having tasks in the Retransmitter which have ranges of seqnos rather than individual seqnos. This is a bit trickier though than single seqnos, as a range of [3 - 10] needs to be broken into [3-5] and [7-10] if seqno 6 is received.
> [1] https://jira.jboss.org/jira/browse/JGRP-1090
> [2] https://jira.jboss.org/jira/browse/JGRP-1051

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list