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

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

                Author: ASF GitHub Bot
            Created on: 11/May/21 13:20
            Start Date: 11/May/21 13:20
    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_r630160108



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LastValueQueue.java
##########
@@ -350,25 +342,33 @@ public SimpleString getLastValueKey() {
       return Collections.unmodifiableSet(map.keySet());
    }
 
+   @Override
+   public boolean canBeDelivered(MessageReference ref) {
+      if (isNonDestructive() && ref instanceof HolderReference) {
+         return !((HolderReference)ref).isDelivered();
+      } else {
+         return true;
+      }
+   }
+
    private static class HolderReference implements MessageReference {
 
       private final SimpleString prop;
 
-      private volatile boolean delivered = false;
+      private volatile AtomicBoolean delivered = new AtomicBoolean(false);

Review comment:
       Please use the AtomicLongFieldUpdater instead?




-- 
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: 594523)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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 20m
>  Remaining Estimate: 0h
>




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

Reply via email to