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

TP: loopback=true does not discard multicast messages from self

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.8
    • None
    • None

    Description

      In TP.handleMyMessage(), we have this code:
      if(loopback && multicast && msg.isFlagSet(Message.LOOPBACK))

      { return; // drop message that was already looped back and delivered }

      Because LOOPBACK is never set in Message, a multicast message sent by A will always (1) get looped back to A and (2) get received but not discarded to to the above code.

      The correct code should check whether the sender and receiver are identical, e.g.
      if(loopback && multicast) {
      if(!isSingleton())

      { if(local_addr != null && local_addr.equals(msg.getSrc())) return; // drop message that was already looped back and delivered }

      }

      The added twist is that we need to handle the case where the shared transport doesn't have a local_addr. In this case, TP.ProtocolAdapter.up() needs to run the same check and discard the message if needed.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: