[
https://issues.apache.org/jira/browse/ARTEMIS-2664?focusedWorklogId=406422&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406422
]
ASF GitHub Bot logged work on ARTEMIS-2664:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 19/Mar/20 17:37
Start Date: 19/Mar/20 17:37
Worklog Time Spent: 10m
Work Description: franz1981 commented on pull request #3029: ARTEMIS-2664
Fix the credits acquiring.
URL: https://github.com/apache/activemq-artemis/pull/3029#discussion_r395204390
##########
File path:
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
##########
@@ -306,15 +306,12 @@ public void acknowledge(MessageAck ack) throws Exception
{
List<MessageReference> ackList =
serverConsumer.getDeliveringReferencesBasedOnProtocol(removeReferences, first,
last);
if (removeReferences && (ack.isIndividualAck() || ack.isStandardAck() ||
ack.isPoisonAck())) {
- this.deliveredAcks.getAndUpdate(deliveredAcks -> {
- if (deliveredAcks >= ackList.size()) {
- return deliveredAcks - ackList.size();
- }
-
- acquireCredit(ackList.size() - deliveredAcks);
+ int previousDeliveredAcks = this.deliveredAcks.getAndUpdate(
+ deliveredAcks -> deliveredAcks > ackList.size() ? deliveredAcks -
ackList.size() : 0);
Review comment:
I am not sure is a good idea to developing it assuming a concurrent access
that is proved to not be present: it means making the core more complex and the
testing should account and stress that too.
@brusdev has already verified that the code can be single-threaded so I vote
for the simplest solution here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 406422)
Time Spent: 3h 10m (was: 3h)
> The prefetch size is exceeded after delivered acks
> --------------------------------------------------
>
> Key: ARTEMIS-2664
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2664
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Domenico Bruscino
> Priority: Major
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> In an environment using OpenWire clients, after the consumer send delivered
> acks, we see that messages get prefetched out to the consumer beyond its
> limit.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)