jbertram commented on a change in pull request #3817:
URL: https://github.com/apache/activemq-artemis/pull/3817#discussion_r768303343



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
##########
@@ -355,7 +355,7 @@ private byte getState() throws NodeManagerException {
                result = bb.get(0);
             }
          } finally {
-            if (lock != null) {
+            if (lock != null && lock.isValid()) {

Review comment:
       Although this isn't on a hot path, generating the exception is expensive 
so I figured it would be best to avoid it if possible.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to