[ 
https://issues.apache.org/jira/browse/ARTEMIS-3285?focusedWorklogId=594525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-594525
 ]

ASF GitHub Bot logged work on ARTEMIS-3285:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/May/21 13:22
            Start Date: 11/May/21 13:22
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3569:
URL: https://github.com/apache/activemq-artemis/pull/3569#discussion_r630162206



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
##########
@@ -1166,17 +1166,19 @@ private void resumeLargeMessage() {
     * @param message
     */
    private void deliverStandardMessage(final MessageReference ref, Message 
message) throws ActiveMQException {
-      applyPrefixForLegacyConsumer(message);
-      int packetSize = callback.sendMessage(ref, message, 
ServerConsumerImpl.this, ref.getDeliveryCount());
+      if (messageQueue.canBeDelivered(ref)) {
+         applyPrefixForLegacyConsumer(message);
+         int packetSize = callback.sendMessage(ref, message, 
ServerConsumerImpl.this, ref.getDeliveryCount());
 
-      if (availableCredits != null) {
-         availableCredits.addAndGet(-packetSize);
+         if (availableCredits != null) {
+            availableCredits.addAndGet(-packetSize);
 
-         if (logger.isTraceEnabled()) {
-            logger.trace(this + "::FlowControl::delivery standard taking " +
-                            packetSize +
-                            " from credits, available now is " +
-                            availableCredits);
+            if (logger.isTraceEnabled()) {
+               logger.trace(this + "::FlowControl::delivery standard taking " +
+                               packetSize +
+                               " from credits, available now is " +
+                               availableCredits);
+            }
          }

Review comment:
       You need to at least test what would happen on journal... try the issue 
out, and look at ./artemis print data if there are duplicates on the journal. I 
believe you would hit worsened issues here. 
   
   you need better tests where you would look at the result on the journal I am 
afraid.




-- 
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 594525)
    Time Spent: 1h 40m  (was: 1.5h)

> Potential duplicate messages with LVQ + non-destructive
> -------------------------------------------------------
>
>                 Key: ARTEMIS-3285
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3285
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to