[ https://issues.apache.org/jira/browse/ARTEMIS-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434011#comment-16434011 ]
ASF subversion and git services commented on ARTEMIS-1800: ---------------------------------------------------------- Commit 70f0908b4ee64e68059a21009db9dd3236c26732 in activemq-artemis's branch refs/heads/master from [~cshannon] [ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=70f0908 ] ARTEMIS-1800 - Fix metrics decrement on scheduled message cancel The queue metrics were being decremented improperly because on iteration over the cancelled scheduled messages because the flag for fromMessageReferences was not set to false. Setting the flag to false skips over the metrics update which is what we want as the scheduled messages were never added to the message references in the first place so the metrics don't need updating > 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 > Assignee: Christopher L. Shannon > 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)