[jboss-jira] [JBoss JIRA] (JGRP-1522) NAKACK / NAKACK2: flushBecomeServerQueue() might trigger sending of message on unconnected channel

Bela Ban (Jira) issues at jboss.org
Mon Aug 3 03:49:01 EDT 2020


     [ https://issues.redhat.com/browse/JGRP-1522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban updated JGRP-1522:
---------------------------
    Description: 
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

  was:
If become_server_queue_size in NAKACK{2} 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



> NAKACK / NAKACK2: flushBecomeServerQueue() might trigger sending of message on unconnected channel
> --------------------------------------------------------------------------------------------------
>
>                 Key: JGRP-1522
>                 URL: https://issues.redhat.com/browse/JGRP-1522
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Major
>             Fix For: 3.2
>
>         Attachments: tmp.log
>
>
> 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



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list