activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1894: ARTEMIS-1700 Fixed deadlock in paging s...
Date Fri, 23 Feb 2018 20:12:01 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1894#discussion_r170355937
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
---
    @@ -1488,7 +1494,13 @@ public synchronized void start() throws Exception {
     
           beforeStart();
     
    -      singleThreadExecutor = executorFactory.getExecutor();
    +      ThreadFactory tFactory = AccessController.doPrivileged(new PrivilegedAction<ThreadFactory>()
{
    +         @Override
    +         public ThreadFactory run() {
    +            return new ActiveMQThreadFactory("ActiveMQ-journal-server-" + this.toString(),
true, ClientSessionFactoryImpl.class.getClassLoader());
    +         }
    +      });
    +      singleThreadExecutor = Executors.newSingleThreadExecutor(tFactory);
    --- End diff --
    
    nope.. that's wrong...
    
    executorFactory.getExecutor() is returning on thread executor from the pool.
    
    
    it won't always be the same thread.. but it will always be the same context.. this patch
is not valid.
    
    
    in what situation do you see a deadlock.
    
    
    hornetq it might be different.. I would need a test to be able to accept a patch here.
we should reuse the thread from the pool always.


---

Mime
View raw message