activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] 02/02: ARTEMIS-2244 Adding critical check around checkDepage
Date Tue, 05 Feb 2019 20:57:55 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 2a8b29995ff5a54d1caa54cc2e82239d21aecbd3
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Tue Feb 5 15:15:10 2019 -0500

    ARTEMIS-2244 Adding critical check around checkDepage
    
    (cherry picked from commit e09ffe14f488efd1013005da9ecc588466dc2905)
---
 .../apache/activemq/artemis/core/server/impl/QueueImpl.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index ffc179b..76cb44f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -106,11 +106,12 @@ import org.jboss.logging.Logger;
  */
 public class QueueImpl extends CriticalComponentImpl implements Queue {
 
-   protected static final int CRITICAL_PATHS = 4;
+   protected static final int CRITICAL_PATHS = 5;
    protected static final int CRITICAL_PATH_ADD_TAIL = 0;
    protected static final int CRITICAL_PATH_ADD_HEAD = 1;
    protected static final int CRITICAL_DELIVER = 2;
    protected static final int CRITICAL_CONSUMER = 3;
+   protected static final int CRITICAL_CHECK_DEPAGE = 4;
 
    private static final Logger logger = Logger.getLogger(QueueImpl.class);
 
@@ -3214,7 +3215,12 @@ public class QueueImpl extends CriticalComponentImpl implements Queue
{
             }
 
             if (needCheckDepage) {
-               checkDepage();
+               enterCritical(CRITICAL_CHECK_DEPAGE);
+               try {
+                  checkDepage();
+               } finally {
+                  leaveCritical(CRITICAL_CHECK_DEPAGE);
+               }
             }
 
          } catch (Exception e) {


Mime
View raw message