You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2018/08/29 10:00:20 UTC
[1/2] activemq-artemis git commit: ARTEMIS-2062 Only attempt to
refill credit when needed
Repository: activemq-artemis
Updated Branches:
refs/heads/master 09f9159ea -> 4109ffc0c
ARTEMIS-2062 Only attempt to refill credit when needed
Avoid firing the offerProducerCredit code when we know that the credit
isnt low enough that a refill is needed, which avoids lock contention
and garbage creation as each inbound message is processed.
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/960833d2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/960833d2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/960833d2
Branch: refs/heads/master
Commit: 960833d2be6cfd632334e7a81b042ea7281d3fdc
Parents: 09f9159
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Aug 28 16:11:14 2018 -0400
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Wed Aug 29 10:51:18 2018 +0100
----------------------------------------------------------------------
.../protocol/amqp/proton/ProtonServerReceiverContext.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/960833d2/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
index c3df1a7..e54a1a5 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
@@ -299,7 +299,9 @@ public class ProtonServerReceiverContext extends ProtonInitializable implements
public void flow(int credits, int threshold) {
// Use the SessionSPI to allocate producer credits, or default, always allocate credit.
if (sessionSPI != null) {
- sessionSPI.offerProducerCredit(address, credits, threshold, receiver);
+ if (receiver.getCredit() <= threshold) {
+ sessionSPI.offerProducerCredit(address, credits, threshold, receiver);
+ }
} else {
connection.lock();
try {
[2/2] activemq-artemis git commit: ARTEMIS-2062: avoid superfluous
attempt to flow credit. This closes #2277.
Posted by ro...@apache.org.
ARTEMIS-2062: avoid superfluous attempt to flow credit. This closes #2277.
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4109ffc0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4109ffc0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4109ffc0
Branch: refs/heads/master
Commit: 4109ffc0c6d4e1494e285002561c5ce8ea57db43
Parents: 09f9159 960833d
Author: Robbie Gemmell <ro...@apache.org>
Authored: Wed Aug 29 10:53:34 2018 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Wed Aug 29 10:53:34 2018 +0100
----------------------------------------------------------------------
.../protocol/amqp/proton/ProtonServerReceiverContext.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------