[ 
https://issues.apache.org/jira/browse/AMQ-9726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on AMQ-9726 started by Christopher L. Shannon.
---------------------------------------------------
> Fix FilePendingMessageCursor clear() method
> -------------------------------------------
>
>                 Key: AMQ-9726
>                 URL: https://issues.apache.org/jira/browse/AMQ-9726
>             Project: ActiveMQ Classic
>          Issue Type: Bug
>    Affects Versions: 5.19.0, 6.1.6
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 6.2.0, 5.19.1, 6.1.7
>
>
> The clear() method inside of {{FilePendingMessageCursor}} is supposed to 
> clear any messages in memory, as well as clear any messages in the disk 
> pending list by destroying it so it can be reset. There are two bugs in this 
> method:
> # Clearing the memory list does not iterate and decrement each reference so 
> the memory usage tracker is not decremented on clear.
> # When clearing the disk list, the wrong destroy method is used so while the 
> list is correctly destroyed and marked as unloaded, the reference is not 
> nulled out. This means that any future writes to the cursor will throw an 
> exception because the cursor is not loaded. The correct helper method will 
> reset this so that future writes will create a list that is correctly 
> initialized.
> The bugs here are not showing up with normal usage because the clear() method 
> is generally only called when destroying a durable (and there is already code 
> to remove the references before calling clear so memory is decremented) 
> however because this method is public and could be easily called in the 
> future it should be fixed so it works correctly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to