activemq-gitbox mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [activemq-artemis] franz1981 edited a comment on pull request #3572: ARTEMIS-3289 Reduce journal appender executor Thread wakeup cost
Date Sat, 15 May 2021 12:00:25 GMT

franz1981 edited a comment on pull request #3572:
URL: https://github.com/apache/activemq-artemis/pull/3572#issuecomment-841618355


   @TomasHofman I see that you've worked on https://issues.apache.org/jira/browse/ARTEMIS-3037.
   My changes for https://issues.apache.org/jira/browse/ARTEMIS-3290  are merging the append
attempt with `checkKnowRecordID` on the appender thread.
   
   I'm not sure I can see the issue re https://issues.apache.org/jira/browse/ARTEMIS-3037
so I don't know if/how I should fix it now.
   I see that there is no way to make read lock lock to throw any exception, see:
   ```java
      public static void main(String[] args) throws InterruptedException {
         ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
         lock.writeLock().lock();
         CountDownLatch started = new CountDownLatch(1);
         final AtomicBoolean tryLock = new AtomicBoolean();
         Thread t = new Thread(() -> {
            started.countDown();
            while (!tryLock.get()) {
   
            }
            System.out.println("try lock");
            try {
               lock.readLock().lock();
            } catch (Throwable err) {
               err.printStackTrace();
            } finally {
               System.out.println("EXIT!");
            }
         });
         t.start();
         started.await();
         t.interrupt();
         tryLock.set(true);
         System.out.println("INTERRUPT!");
      }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message