[jboss-jira] [JBoss JIRA] (JGRP-1768) NAKACK2: processing of OOB messages and message batches
Bela Ban (JIRA)
issues at jboss.org
Thu Jan 9 06:17:33 EST 2014
Bela Ban created JGRP-1768:
------------------------------
Summary: NAKACK2: processing of OOB messages and message batches
Key: JGRP-1768
URL: https://issues.jboss.org/browse/JGRP-1768
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.5
Currently, when OOB message batches are received, the following happens:
* All messages from the batch are added to the table
* We iterate through the batch and remove those message whose {{OOB_DELIVERED}} flag cannot be set (already processed and delivered by a different thread).
* The batch is passed up
* Then we try to remove as many messages from the table as possible and pass them up (as a batch again)
** Messages whose {{OOB_DELIVERED}} flag is set, are discarded
This is a lot of work and we're accessing the table more than needed for OOB batches. A few things can be changed to make this more efficient:
* The thread which processes a message ot message batch will deliver the message to the application if the message or batch hasn't been delivered yet
** Batch
*** we only add those messages from list L to table T if they haven't yet been added
*** Messages from L which couldn't be added to T are removed from L
*** All messages from L are added to a new batch and that batch is then passed up (delivered)
** Single message
*** If the message was added successfuly, we deliver it, else we drop it
* When removing messages from the table ({{Table.removeMany()}}), we skip OOB messages. This is done with a new Table.add() method (including a filter)
* Further optimization: when adding an OOB message to T, we add a reference to a static OOB message, so *all OOB messages in a table point to the same instance !* Since we skip OOB messages when removing messages, this doesn't matter. However, this reduces the memory needed by Table if there are many OOB messages
--
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: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list