[
https://issues.apache.org/jira/browse/AMQ-9726?focusedWorklogId=971935&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-971935
]
ASF GitHub Bot logged work on AMQ-9726:
---------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jun/25 11:18
Start Date: 05/Jun/25 11:18
Worklog Time Spent: 10m
Work Description: cshannon merged PR #1452:
URL: https://github.com/apache/activemq/pull/1452
Issue Time Tracking
-------------------
Worklog Id: (was: 971935)
Time Spent: 0.5h (was: 20m)
> 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
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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