activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-2772) ActiveMQConnectionConsumer will break failover
Date Fri, 11 Jun 2010 13:45:53 GMT

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

Gary Tully resolved AMQ-2772.
-----------------------------

    Fix Version/s: 5.4.0
       Resolution: Fixed

patch applied to r953696 with an additional test case. We may need some additional MDB tests
that validate transaction semantics in the event of failover and no redelivery but the existing
rollback logic with a timeout should suffice.
In any event, this change will prevent the block with was just plain wrong. nice catch, thanks.

> ActiveMQConnectionConsumer will break failover
> ----------------------------------------------
>
>                 Key: AMQ-2772
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2772
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.3.2
>            Reporter: Siim Kaalep
>            Assignee: Gary Tully
>             Fix For: 5.4.0
>
>
> ActiveMQConnection.transportInterupted assumes that
> dispatchers.size() == all session's consumers + one advisoryConsumer
> But ActiveMQConnectionConsumer also registers itself as dispatcher in constructor.
> On failover attempt connection will remain in waiting state. 
> Logging "dispatch paused, waiting for outstanding dispatch interruption processing (1)
to complete.."
> ActiveMQConnectionConsumer is used in ActiveMQ resource adapter in ActiveMQEndpointWorker.
> Robust fix:
> {noformat} 
> Index: trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> ===================================================================
> --- trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> +++ trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> @@ -1840,7 +1840,7 @@
>  	}
>  
>      public void transportInterupted() {
> -        transportInterruptionProcessingComplete = new CountDownLatch(dispatchers.size()
- (advisoryConsumer != null ? 1:0));
> +        transportInterruptionProcessingComplete = new CountDownLatch(dispatchers.size()
- (advisoryConsumer != null ? 1:0) - connectionConsumers.size());
>          if (LOG.isDebugEnabled()) {
>              LOG.debug("transport interrupted, dispatchers: " + transportInterruptionProcessingComplete.getCount());
>          }
> {noformat} 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message