Github user bgutjahr commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1144#discussion_r108618664
  
    --- Diff: 
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadPoolExecutor.java
 ---
    @@ -46,32 +45,70 @@
        private static class ThreadPoolQueue extends 
LinkedBlockingQueue<Runnable> {
     
           private ActiveMQThreadPoolExecutor executor = null;
    +      private int idleThreads = 0;
     
           public void setExecutor(ActiveMQThreadPoolExecutor executor) {
              this.executor = executor;
           }
     
           @Override
    -      public boolean offer(Runnable runnable) {
    +      public synchronized boolean offer(Runnable runnable) {
    --- End diff --
    
    I put the code into our product and tested the specific issue that a HA 
backup server is occasionally not taking over. So far, our product tests have 
not found new issues and I couldn't reproduce the HA backup failover issue. I 
did not run any performance tests.
    BTW: I have rechecked the code and found a solution without any 
synchronization, just using an AtomicInteger. I'm currently testing my new 
changed and want to also discuss my changes with a collegue. I suggest to wait 
reviewing and testing my changes until I committed these changes later today.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to