Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-402

Fuse MQ: scheduled task used by LeaserLocker to renew lease is stopped when the new org.apache.activemq.broker.SuppressReplyException is thrown, allowing two brokers to become master.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.1
    • JBoss A-MQ 6.0
    • broker
    • None

    Description

      In org.apache.activemq.store.jdbc.LeaseDatabaseLocker the ".handleIOException(ioe)" invocation (in code below) will throw an org.apache.activemq.broker.SuppressReplyException rather than the original IOException. The SuppressReplyException is a RuntimeException and will bubble up to the ScheduleThreadPoolExecutor . This will stop the scheduled task used for checking/renewing the lease.| ...|

       
      public class LeaseDatabaseLocker extends AbstractLocker {
       
      ...
       
      public boolean keepAlive() throws IOException {
      ...
       
      try{
      ...
       
      {color:black}} catch (Exception e) {{color}
      LOG.warn(getLeaseHolderId() + ", failed to update lease: " + e, e);
      IOException ioe = IOExceptionSupport.create(e);
      persistenceAdapter.getBrokerService().handleIOException(ioe);
      throw ioe;
      {color:black}} finally {{color}
      close(statement);
      close(connection);
      {color:black}}
       

      The broker may still acquire the lease as JDBCIOExceptionHandler also calls keepalive when dealing with an SQLException. After the JDBCIOExceptionHandler has dealt with the SQLException the broker will not renew the lease (or check it) and the slave broker will acquire the lease when the lease period expires. This leads to a scenario where both brokers believe they are the master.

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: