Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1767

UNICAST3: processing of OOB messages and message batches

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 3.5
    • None
    • None

      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

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: