[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1728) OrderingGroupMonitor shouldn't hold any MessageReference objects that are paged

Markus Lutum (JIRA) jira-events at lists.jboss.org
Mon Aug 31 09:58:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBMESSAGING-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12483670#action_12483670 ] 

Markus Lutum commented on JBMESSAGING-1728:
-------------------------------------------

Hi Howard.

Its not only memory!
I just found the issue why my handling stops.

If you add a message while paged messages are loaded and handled the message is registered to the OrderingGroup.
The OrderingGroup holds the references in an LinkedList. The new message is added at last.
But this is NOT the last position of the full queue. Only the last position in the LinkedList.
After the first messages are handled the isAvailable() return NOT_OK_NOT_FIRST 
(please also fix the javadoc of OrderingGroupMonitor.isAvailable(MessageReference) line: 121	)

example Queue set to full 5 page 2:
after server start jbm load the first 5 messages in the queue (6 to 20 still in the DB)
-> 1 2 3 4 5
handled message 1
-> 2 3 4 5
handled message 2
-> 3 4 5
reloaded 2 paged
-> 3 4 5 6 7
added a new one (21) and handle 3
-> 4 5 6 7 21
handled message 4 then relaoded next paged msg
-> 5 6 7 21 8 9
....
result in:
-> 21 8 9 10 11 12 
and stops forever!!


Stack:
ReferenceHolder.isAvailable(MessageReference) line: 249	
OrderingGroup.isAvailable(MessageReference) line: 111	
OrderingGroupMonitor.isAvailable(MessageReference) line: 121	
MessagingQueue(ChannelSupport).deliverInternal() line: 646	
MessagingQueue.deliverInternal() line: 506	
ChannelSupport$InMemoryCallback.afterCommit(boolean) line: 1077	
Transaction.commit() line: 228	


The problem is I think that the iterated message references does not contain the registered on because it was added via the downcache to the DB.

So you are right. the messages should not be registered, but not because of the memory... 


> OrderingGroupMonitor shouldn't hold any MessageReference objects that are paged
> -------------------------------------------------------------------------------
>
>                 Key: JBMESSAGING-1728
>                 URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1728
>             Project: JBoss Messaging
>          Issue Type: Bug
>          Components: Messaging Core
>    Affects Versions: 1.4.0.SP3.CP08, 1.4.4.GA
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>             Fix For: 1.4.0.SP3.CP09, 1.4.5.GA
>
>
> OrderingGroupMonitor registers ordering group messages by holding its messages. In paging mode, it will take up memories.
> We need to refactor it to:
> 1. only register in memory references.
> 2. don't hold it's reference in the OrderingGroupMonitor, only the MessageID will suffice.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list