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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.11, 3.1
    • Labels:
      None
    • Steps to Reproduce:
      Hide

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

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

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            belaban Bela Ban
            Reporter:
            belaban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: