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/12/05 17:54:06 UTC

[GitHub] [activemq-artemis] franz1981 commented on a change in pull request #2909: ARTEMIS-2567 restore locking semantics on server.lock when reading st…

franz1981 commented on a change in pull request #2909: ARTEMIS-2567 restore locking semantics on server.lock when reading st…
URL: https://github.com/apache/activemq-artemis/pull/2909#discussion_r354460395
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
 ##########
 @@ -108,7 +108,16 @@ public synchronized void start() throws Exception {
    protected synchronized void setUpServerLockFile() throws IOException {
       super.setUpServerLockFile();
 
-      for (int i = 0; i < 3; i++) {
+      if (lockChannels[0] == null || !lockChannels[0].isOpen()) {
+         File fileLock = newFile(NodeManager.SERVER_LOCK_NAME);
+         if (!fileLock.exists()) {
+            fileLock.createNewFile();
 
 Review comment:
   what if return false, because already exists?

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