]
Bela Ban commented on JGRP-1593:
--------------------------------
This doesn't happen in UNICAST, UNICAST2 and UNICAST3, as we add messages to the
receiver window one by one. If we change this to use Table.add(List), then we could use
the same solution as for NAKACK2 (removing all rejected messages from the list for OOB
messages).
NAKACK2: message batching leads to duplicate OOB messages
---------------------------------------------------------
Key: JGRP-1593
URL:
https://issues.jboss.org/browse/JGRP-1593
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.3
In NAKACK2.up(MessageBatch batch):
* Assume we have a batch of 5 copies (duplicates) of message A5
* When we call Table.add(List), it returns true if at least one message was added
** Say the first A5 message was added, but the others were discarded
* If the message is OOB, then for each message, we
** Check if we can set OOB_DELIVERED
** If true, we pass it up, else we discard it
* However, because every A5 message is a *copy*, we'll be able to set the flag on
*all* 5 messages and pass all messages up !
* This means we're allowing the 4 duplicate messages to pass up !
Note that this does *not* happen when we don't batch messages as every messages is
added individually, and 'added' will therefore be true or false.
Also, if we're the sender of a message (loopback), then we'll fetch, for each
seqno, the corresponding message from the table and therefore setTransientFlagIfAbsent()
will only return true *once* for the same message, as we're fetching the same message
for the same seqno.
SOLUTION:
* Add another Table.add(List) method which *removes* all messages that weren't added
to the table (because they were dupes)
** This method would only get called if the message batch is OOB
* If OOB and at least 1 message was added, we can now pass all messages from the
remaining list up and set OOB_DELIVERED
** As the messages in the list have been added to the table (keyed by seqno), if some
other thread wants to add a message with the same seqno, it'll fail as OOB_DELIVERED
is already set amd we're dealing with the same message
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: