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

 ##########
 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:
   I'm not sure, I don't want the original method to be called without using 
the proper lock order and having them in one place will help to avoid misusing: 
that's personal...
   If not, we can split the method and add an assertion to ensure that the 
deliveryLock needs to be held by the current Thread too: it will avoid future 
misuses.

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