You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Harp (JIRA)" <ji...@apache.org> on 2012/05/16 18:09:03 UTC
[jira] [Created] (AMQ-3846) The JMX message move, copy and remove
operation do not take messages in FIFO order
David Harp created AMQ-3846:
-------------------------------
Summary: The JMX message move, copy and remove operation do not take messages in FIFO order
Key: AMQ-3846
URL: https://issues.apache.org/jira/browse/AMQ-3846
Project: ActiveMQ
Issue Type: Bug
Components: JMX
Affects Versions: 5.6.0, 5.5.1
Reporter: David Harp
When a page is pulled in, it is placed in a LinkedHashMap which preserves the queue order, but the below code then pulls the values from the LinkedHashMap and puts them in a Set. This causes the FIFO order of the queue to be lost. If the number of max messages to move is smaller the the page size, then the outcome looks like random messages from the queue being moved (copied or removed).
...
Set<MessageReference> set = new HashSet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
pagedInMessagesLock.readLock().lock();
try{
set.addAll(pagedInMessages.values());
}finally {
pagedInMessagesLock.readLock().unlock();
}
...
Can this be changed to preserve the queue order?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3846) The JMX message move, copy and remove
operation do not take messages in FIFO order
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQ-3846.
-------------------------------
Resolution: Fixed
Fix Version/s: 5.7.0
Assignee: Timothy Bish
Fix and new tests added to trunk.
> The JMX message move, copy and remove operation do not take messages in FIFO order
> ----------------------------------------------------------------------------------
>
> Key: AMQ-3846
> URL: https://issues.apache.org/jira/browse/AMQ-3846
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMX
> Affects Versions: 5.5.1, 5.6.0
> Reporter: David Harp
> Assignee: Timothy Bish
> Fix For: 5.7.0
>
>
> When a page is pulled in, it is placed in a LinkedHashMap which preserves the queue order, but the below code then pulls the values from the LinkedHashMap and puts them in a Set. This causes the FIFO order of the queue to be lost. If the number of max messages to move is smaller the the page size, then the outcome looks like random messages from the queue being moved (copied or removed).
> ...
> Set<MessageReference> set = new HashSet<MessageReference>();
> ConnectionContext context = createConnectionContext();
> do {
> doPageIn(true);
> pagedInMessagesLock.readLock().lock();
> try{
> set.addAll(pagedInMessages.values());
> }finally {
> pagedInMessagesLock.readLock().unlock();
> }
> ...
> Can this be changed to preserve the queue order?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3846) The JMX message move, copy and remove
operation do not take messages in FIFO order
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400748#comment-13400748 ]
Timothy Bish commented on AMQ-3846:
-----------------------------------
Do you have a unit test case for this, would help to ensure any fix remains fixed in the future.
> The JMX message move, copy and remove operation do not take messages in FIFO order
> ----------------------------------------------------------------------------------
>
> Key: AMQ-3846
> URL: https://issues.apache.org/jira/browse/AMQ-3846
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMX
> Affects Versions: 5.5.1, 5.6.0
> Reporter: David Harp
>
> When a page is pulled in, it is placed in a LinkedHashMap which preserves the queue order, but the below code then pulls the values from the LinkedHashMap and puts them in a Set. This causes the FIFO order of the queue to be lost. If the number of max messages to move is smaller the the page size, then the outcome looks like random messages from the queue being moved (copied or removed).
> ...
> Set<MessageReference> set = new HashSet<MessageReference>();
> ConnectionContext context = createConnectionContext();
> do {
> doPageIn(true);
> pagedInMessagesLock.readLock().lock();
> try{
> set.addAll(pagedInMessages.values());
> }finally {
> pagedInMessagesLock.readLock().unlock();
> }
> ...
> Can this be changed to preserve the queue order?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira