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

NAKACK / NAKACK2: flushBecomeServerQueue() might trigger sending of message on unconnected channel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.2
    • 3.2
    • None
    • Hide

      Set NAKACK2.become_server_queue_size to 0

      Show
      Set  NAKACK2.become_server_queue_size to 0

      If become_server_queue_size in NAKACK2 is > 0, both protocols buffer messages sent before is_server=true, and replay them when the first view is received or when a BECOME_SERVER event is received.
      There are 2 issues associated with this:

      #1 When flushing the become_server_queue, we should never call up(Event) directly (use the thread pool). [This is not the issue that's causing this though]

      #2 When the queue is flushed on the first view change, this might trigger messages to be delivered to the application, which in turn might send messages (all on the same thread, because of #1). As the channel is yet unconnected, the message send will trigger an exception, which causes the JOIN to fail !

      SOLUTION:

      • Flush become_server_queue in a separate task (good practice to do this on a separate thread anyway !)
      • Only flush the become_server_queue when receiving a BECOME_SERVER event, not when receiving the first view change

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

                Created:
                Updated:
                Resolved: