[ 
https://issues.apache.org/jira/browse/ARTEMIS-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432788#comment-16432788
 ] 

ASF GitHub Bot commented on ARTEMIS-1800:
-----------------------------------------

GitHub user cshannon opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2008

    ARTEMIS-1800 - fix duplicate metrics update on scheduled message cancel

    When removing scheduled messages from a queue the scheduled message
    metrics were being decremented twice

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cshannon/activemq-artemis ARTEMIS-1800

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2008.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2008
    
----
commit 122782ae460a789c883beb21bfccb80089d9bb59
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@...>
Date:   2018-04-10T19:06:28Z

    ARTEMIS-1800 - fix duplicate metrics update on scheduled message cancel
    
    When removing scheduled messages from a queue the scheduled message
    metrics were being decremented twice

----


> Incorrect number of messages on queue after remove of scheduled message
> -----------------------------------------------------------------------
>
>                 Key: ARTEMIS-1800
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1800
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.5.0
>            Reporter: Justin Bertram
>            Priority: Major
>
> This will reproduce the failure if added to 
> {{org.apache.activemq.artemis.tests.integration.management.QueueControlTest}}:
> {noformat}
>    @Test
>    public void testGetScheduledCountOnRemove() throws Exception {
>       long delay = Integer.MAX_VALUE;
>       SimpleString address = RandomUtil.randomSimpleString();
>       SimpleString queue = RandomUtil.randomSimpleString();
>       session.createQueue(address, RoutingType.MULTICAST, queue, null, 
> durable);
>       QueueControl queueControl = createManagementControl(address, queue);
>       Assert.assertEquals(0, queueControl.getScheduledCount());
>       ClientProducer producer = session.createProducer(address);
>       ClientMessage message = session.createMessage(durable);
>       message.putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, 
> System.currentTimeMillis() + delay);
>       producer.send(message);
>       queueControl.removeAllMessages();
>       Assert.assertEquals(0, queueControl.getMessageCount());
>       session.deleteQueue(queue);
>    }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to