[
https://issues.apache.org/jira/browse/ARTEMIS-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16598039#comment-16598039
]
ASF subversion and git services commented on ARTEMIS-2062:
----------------------------------------------------------
Commit 2029f897c7b367e99a28a0e2db0ee3eb822b18d8 in activemq-artemis's branch
refs/heads/2.6.x from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=2029f89 ]
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.
(cherry picked from commit 960833d2be6cfd632334e7a81b042ea7281d3fdc)
> AMQP: Reduce lock contention and allocations on message processing
> -------------------------------------------------------------------
>
> Key: ARTEMIS-2062
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2062
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: AMQP
> Affects Versions: 2.6.2
> Reporter: Timothy Bish
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 2.7.0
>
>
> On each inbound message the current AMQP handler attempts to top off credit
> for the receiver which results in a new runnable being created to hand off to
> the PagingManager or PagingStore and that code will result in a lock / unlock
> on the connection lock regardless of credit needing to be offered. The
> handler can tell if the credit is below the min credits threshold before ever
> needing to fire this action and can avoid that work for each message by only
> firing off the credit offering code when the credit is known to be low.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)