[
https://issues.apache.org/jira/browse/AMQ-9726?focusedWorklogId=971934&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-971934
]
ASF GitHub Bot logged work on AMQ-9726:
---------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jun/25 11:17
Start Date: 05/Jun/25 11:17
Worklog Time Spent: 10m
Work Description: cshannon commented on PR #1452:
URL: https://github.com/apache/activemq/pull/1452#issuecomment-2943784763
Test failure is flaky test that has been fixed in:
https://github.com/apache/activemq/commit/6581ed7e74cf1ad9ca95aa192a2f6cd05a464a5d
Issue Time Tracking
-------------------
Worklog Id: (was: 971934)
Time Spent: 20m (was: 10m)
> 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: 20m
> 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