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

TP: unicast messages are not looped back when using a shared transport

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.11, 3.1
    • None
    • None
    • Hide

      Set UDP.singleton_name="shared" and send unicast messages to self

      Show
      Set UDP.singleton_name="shared" and send unicast messages to self

      In TP.down, we have the following code:
      if(loopback && (multicast || (dest.equals(msg.getSrc()) && dest.equals(local_addr)))) {
      // loop back
      return;
      }
      send(msg)

      If loopback=true and !multicast, we still never loop back a unicast message as local_addr will always be false when we use a shared transport (singleton_name != null).

      SOLUTION:
      Drop the last part of the if-clause:
      if(loopback && (multicast || (dest.equals(msg.getSrc()))))

      This is in down(), so msg.getSrc() can only be sent by the local member, so the last part is not needed.

      Note that this issue doesn't cause erroneous behavior, but unnecessarily sends a unicast message to self, where it could have been looped back.

              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: