You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2018/10/24 14:58:06 UTC

[1/2] activemq-artemis git commit: ARTEMIS-2146 Avoiding NPE on AMQP Flow Control

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 23cc4f45c -> 3a8c25c4c


ARTEMIS-2146 Avoiding NPE on AMQP Flow Control

AMQP Flow control will disable consumer flow control (setting credits to null)
This will avoid a race checking flow control.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/51327753
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/51327753
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/51327753

Branch: refs/heads/master
Commit: 5132775371300de3a0c34e119d205f546f070c63
Parents: 23cc4f4
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Oct 23 12:43:36 2018 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Oct 24 10:55:56 2018 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/ServerConsumerImpl.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/51327753/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
index 470aeb6..e38c22c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
@@ -349,7 +349,9 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
 
    @Override
    public HandleStatus handle(final MessageReference ref) throws Exception {
-      if (callback != null && !callback.hasCredits(this) || availableCredits != null && availableCredits.get() <= 0) {
+      // available credits can be set back to null with a flow control option.
+      AtomicInteger checkInteger = availableCredits;
+      if (callback != null && !callback.hasCredits(this) || checkInteger != null && checkInteger.get() <= 0) {
          if (logger.isDebugEnabled()) {
             logger.debug(this + " is busy for the lack of credits. Current credits = " +
                             availableCredits +


[2/2] activemq-artemis git commit: This closes #2393

Posted by ta...@apache.org.
This closes #2393


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3a8c25c4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3a8c25c4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3a8c25c4

Branch: refs/heads/master
Commit: 3a8c25c4c85fe5c3b02b3f0aae72e7395269a94f
Parents: 23cc4f4 5132775
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Oct 24 10:57:11 2018 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Oct 24 10:57:11 2018 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/ServerConsumerImpl.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------