You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/07/10 17:31:21 UTC

[GitHub] [activemq-artemis] michaelandrepearce commented on a change in pull request #2547: Patched with live lock evaluation

michaelandrepearce commented on a change in pull request #2547: Patched with live lock evaluation
URL: https://github.com/apache/activemq-artemis/pull/2547#discussion_r302186025
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
 ##########
 @@ -49,21 +56,40 @@
 
    private static final byte NOT_STARTED = 'N';
 
-   private FileLock liveLock;
+   private static final int LOCK_MONITOR_TIMEOUT_MILLIES = 2000;
+
+   private volatile FileLock liveLock;
 
    private FileLock backupLock;
 
    protected long lockAcquisitionTimeout = -1;
 
    protected boolean interrupted = false;
 
+   private ScheduledExecutorService scheduledPool;
+
    public FileLockNodeManager(final File directory, boolean replicatedBackup) {
       super(replicatedBackup, directory);
+      this.scheduledPool = new ScheduledThreadPoolExecutor(1);
 
 Review comment:
   Should use the global threadpool for scheduled tasks not its own

----------------------------------------------------------------
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


With regards,
Apache Git Services