activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <...@git.apache.org>
Subject [GitHub] activemq-artemis issue #1576: ARTEMIS-1447 JDBC NodeManager to support JDBC ...
Date Tue, 10 Oct 2017 14:30:13 GMT
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1576
  
    @clebertsuconic You're right, I need to take a better example to explain what I mean.
    Quoting from the `CriticalAnaylizerImpl`:
    
    ```
          // we are not using any Thread Pool or any Scheduled Executors from the ArtemisServer
          // as that would defeat the purpose,
          // as in any deadlocks the schedulers may be starving for something not responding
fast enough
          thread = new Thread("Artemis Critical Analyzer")
    ```
    The reason is similar: if for any reason (eg deadlocks/long JVM pauses/a single long running
task) the live/backup locks wouldn't be renewed with the correct timing (ie not a matter to
be fast but with a correct timing), the mechanics of the node manager will be compromised.
It sounds cathastrofic but is the same limitation of the original JDBC lock of ActiveMQ 6:
[LeaseDatabaseLocker](https://github.com/apache/activemq/blob/master/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/LeaseDatabaseLocker.java
).
    Hence I need 2 executors that cannot be shared with none in order to minimize the chance
of being slowed down.
    To summarize:
    > if you need your own executor, still use the component which encapsulates that..

    
    I need 2 of them (live + backup), not shared and to use `scheduleWithFixedRate` instead
of `scheduleWithFixedDelay` used in the `ActiveMQScheduledComponent`: probably is not the
right choice.
    
    > if you can reuse one from the pool.. (It seems you can).. you can just pass in the
argument.
    
    I can pass them in the argument, but given that I need them to be unshared and I can't
be sure of it if they will be instantiated elsewhere.
    
    In order to use your advice what I can do (maybe similar) is to pass a common thread pool
and run the scheduled executors on top of it.
    
    And Re the package there is a good place (and module) in your opinion where I could move
the classes?
    
    
    
    
    
    
    



---

Mime
View raw message