You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/02/05 20:51:37 UTC
[activemq-artemis] branch master updated (4f758f3 -> 8873beb)
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git.
from 4f758f3 This closes #2536
new 8799615 ARTEMIS-2244 checkDepage method placed outside CRITICAL_DELIVER avoid critical analyzer timeout
new e09ffe1 ARTEMIS-2244 Adding critical check around checkDepage
new 8873beb This closes #2533
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../artemis/core/server/impl/QueueImpl.java | 26 ++++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
[activemq-artemis] 02/03: ARTEMIS-2244 Adding critical check around
checkDepage
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit e09ffe14f488efd1013005da9ecc588466dc2905
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Feb 5 15:15:10 2019 -0500
ARTEMIS-2244 Adding critical check around checkDepage
---
.../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 a61a3d6..9d1988f 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
@@ -112,11 +112,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);
private static final AtomicIntegerFieldUpdater dispatchingUpdater = AtomicIntegerFieldUpdater.newUpdater(QueueImpl.class, "dispatching");
@@ -3433,7 +3434,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) {
[activemq-artemis] 03/03: This closes #2533
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 8873beb828651be4f12e31643cef3423c1036d78
Merge: 4f758f3 e09ffe1
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Feb 5 15:51:26 2019 -0500
This closes #2533
.../artemis/core/server/impl/QueueImpl.java | 26 ++++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
[activemq-artemis] 01/03: ARTEMIS-2244 checkDepage method placed
outside CRITICAL_DELIVER avoid critical analyzer timeout
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 8799615a136946c39bb49bd4069cff2df0035997
Author: yb <17...@cn.suning.com>
AuthorDate: Thu Jan 31 17:20:06 2019 +0800
ARTEMIS-2244 checkDepage method placed outside CRITICAL_DELIVER avoid critical analyzer timeout
---
.../activemq/artemis/core/server/impl/QueueImpl.java | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 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 8209995..a61a3d6 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
@@ -2409,7 +2409,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
* This method will deliver as many messages as possible until all consumers are busy or there
* are no more matching or available messages.
*/
- private void deliver() {
+ private boolean deliver() {
if (logger.isDebugEnabled()) {
logger.debug(this + " doing deliver. messageReferences=" + messageReferences.size());
}
@@ -2430,7 +2430,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
deliverAsync();
- return;
+ return false;
}
if (System.currentTimeMillis() > timeout) {
@@ -2440,7 +2440,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
deliverAsync();
- return;
+ return false;
}
MessageReference ref;
@@ -2451,7 +2451,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
// Need to do these checks inside the synchronized
if (paused || !canDispatch() && redistributor == null) {
- return;
+ return false;
}
if (messageReferences.size() == 0) {
@@ -2571,7 +2571,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
}
}
- checkDepage();
+ return true;
}
protected void removeMessageReference(ConsumerHolder<? extends Consumer> holder, MessageReference ref) {
@@ -3423,13 +3423,19 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
// We will be using the deliverRunner instance as the guard object to avoid multiple threads executing
// an asynchronous delivery
enterCritical(CRITICAL_DELIVER);
+ boolean needCheckDepage = false;
try {
synchronized (QueueImpl.this.deliverRunner) {
- deliver();
+ needCheckDepage = deliver();
}
} finally {
leaveCritical(CRITICAL_DELIVER);
}
+
+ if (needCheckDepage) {
+ checkDepage();
+ }
+
} catch (Exception e) {
ActiveMQServerLogger.LOGGER.errorDelivering(e);
} finally {