[ 
https://issues.apache.org/jira/browse/ARTEMIS-2567?focusedWorklogId=354547&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-354547
 ]

ASF GitHub Bot logged work on ARTEMIS-2567:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Dec/19 18:20
            Start Date: 05/Dec/19 18:20
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on pull request #2909: ARTEMIS-2567 
restore locking semantics on server.lock when reading st…
URL: https://github.com/apache/activemq-artemis/pull/2909#discussion_r354472614
 
 

 ##########
 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:
   If the `if` returns false then that means `lockChannels[0]` is not equal to 
`null` and it's open which means we don't need to create the file or get the 
channel. It's the same basic logic that was already in place. I didn't change 
the semantics on that part.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 354547)
    Time Spent: 1h  (was: 50m)

> Shared-store failback broken on NFS
> -----------------------------------
>
>                 Key: ARTEMIS-2567
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2567
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.10.1
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>             Fix For: 2.11.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The changes from ARTEMIS-2441 caused a regression of the issue fixed by 
> ARTEMIS-1417.
> The changes in ARTEMIS-1417 made sure to lock/unlock the {{server.lock}} file 
> when reading the state information in order to deal with stale data over NFS.
> However, the changes from ARTEMIS-2441 split the lock into several different 
> files which means that when the state information is read now the 
> {{server.lock}} file itself is not locked/unlocked which results in reading 
> stale data on the slave.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to