Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-6249

Slave node should try to get lock in small intervals to check JDBC connectivity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.11.1
    • None
    • JDBC
    • None
    • ServiceMix 5.4.1

    • Patch Available

    Description

      In a JDBC master/slave configuration, the master node gets the lock in the database table ACTIVEMQ_LOCK and becomes active. The slave node tries to get the lock and waits indefinitely on the SQL query.
      In case of a network device failure, the TCP connection to the DB server is abruptly removed, and no FIN nor RST is sent to the broker. This results into a slave node which never resumes from this network issue without manual restart of the broker.
      The attached patch transforms the indefinite wait on the lock into a loop in small time intervals (defined by the "queryTimeout" variable). Also, it becomes possible to specify a TCP socket timeout at the JDBC driver level (for instance "oracle.jdbc.ReadTimeout" for Oracle) as an extra safety measure.
      In the default case, the "queryTimeout=-1", which falls back to the indefinite wait.

      Attachments

        Activity

          People

            Unassigned Unassigned
            metatech metatech
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: