michaelandrepearce commented on a change in pull request #2577: ARTEMIS-1604 
Artemis deadlock using MQTT Protocol
URL: https://github.com/apache/activemq-artemis/pull/2577#discussion_r264402308
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ##########
 @@ -3069,57 +3080,74 @@ private void move(final Transaction originalTX,
     * This method delivers the reference on the callers thread - this can give 
us better latency in the case there is nothing in the queue
     */
    private boolean deliverDirect(final MessageReference ref) {
-      synchronized (this) {
-         if (!supportsDirectDeliver) {
-            return false;
-         }
-         if (paused || !canDispatch() && redistributor == null) {
-            return false;
-         }
+      //The order to enter the deliverLock re QueueImpl::this lock is very 
important:
 
 Review comment:
   rather than this, why not have the original method renamed and existing 
method with the lock delegating then to the renamed (but original) method. This 
way keeps the lock cleaner as like in deliverRunner it just has lock and then 
delegates.

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