[ 
https://issues.apache.org/jira/browse/AMQ-5473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

AR updated AMQ-5473:
--------------------
    Description: 
Link Stealing creates a new connection and disconnects the old connection. 
These operations are done concurrently.
New connection triggers addConsumer() for active subscriptions and old 
connection stop causes removeConsumer() for the same.

Problems:
 * addConsumer() would throw exception that the sub is already active (if 
remove did not happen before)
 * even if we go past the exception, it will not set the right (new) connection 
context and consumer info the subs
 * removeConsumer() may remove subcription even if it had different connection 
context (created by linkstealing)


Patch attached.

  was:
Link Stealing creates a new connection and disconnects the old connection. 
These operations are done concurrently.
New connection triggers addConsumer() for active subscriptions and old 
connection stop causes removeConsumer() for the same.

Problems:
 * addConsumer() would throw exception that the sub is already active (if 
remove did not happen before)
 * even if we go past the exception, it will not set the right (new) connection 
context and consumer info the subs
 * remove consumer may remove subcription even if it had different connection 
context (created by linkstealing)


Patch attached.


> Race condition caused by Linkstealing might make durable subs inactive
> ----------------------------------------------------------------------
>
>                 Key: AMQ-5473
>                 URL: https://issues.apache.org/jira/browse/AMQ-5473
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.11.0
>            Reporter: AR
>         Attachments: linksteal_durablesub.patch
>
>
> Link Stealing creates a new connection and disconnects the old connection. 
> These operations are done concurrently.
> New connection triggers addConsumer() for active subscriptions and old 
> connection stop causes removeConsumer() for the same.
> Problems:
>  * addConsumer() would throw exception that the sub is already active (if 
> remove did not happen before)
>  * even if we go past the exception, it will not set the right (new) 
> connection context and consumer info the subs
>  * removeConsumer() may remove subcription even if it had different 
> connection context (created by linkstealing)
> Patch attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to