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

 ##########
 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:
   I left this one for some test case(s) which I didn't want to change. But I 
can change the test cases to use the new constructor. So unless the reason 
changes your mind I will be changing the test cases to take care of creating 
this executor and passing it to the FileLockNodeManager.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to