[
https://issues.apache.org/jira/browse/AMQ-9823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046608#comment-18046608
]
ASF subversion and git services commented on AMQ-9823:
------------------------------------------------------
Commit 5cc1e73b6ade9cb9d0fed5c3702c22fbebee9dcb in activemq's branch
refs/heads/main from Christopher L. Shannon
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=5cc1e73b6a ]
AMQ-9823 - properly clear ack set from ackAndPreparedMap
Fix the logic that removes prepared acks from the ackAndPreparedMap
that were loaded during XA recovery on commit/rollback so that if the
set of acks for a key is empty the set it is removed from the map
> KahaDBStore ackAndPreparedMap is not properly cleared when recovered acks are
> removed
> --------------------------------------------------------------------------------------
>
> Key: AMQ-9823
> URL: https://issues.apache.org/jira/browse/AMQ-9823
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, KahaDB
> Affects Versions: 6.2.0, 5.19.1, 6.1.8
> Reporter: Christopher L. Shannon
> Assignee: Christopher L. Shannon
> Priority: Major
> Fix For: 6.3.0, 5.19.2, 6.2.1
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Kahadb tracks prepared acks for an XA transaction to be recovered inside of
> the
> [ackedAndPreparedMap|https://github.com/apache/activemq/blob/7aa5bad9e3055f65b15f047ceb9f4f24327f5309/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java#L416].
> The map contains the set of prepared acks that were recovered. After
> commit/rollback the acks are supposed to be
> "[forgotten|https://github.com/apache/activemq/blob/7aa5bad9e3055f65b15f047ceb9f4f24327f5309/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java#L458]"
> and removed from the map.
> They method correctly clears from the set but there is a bug where an empty
> set is left in the map because the map is
> [checked|https://github.com/apache/activemq/blob/7aa5bad9e3055f65b15f047ceb9f4f24327f5309/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java#L468]
> to see if it is empty vs checking the set so the set never gets removed so
> this could in theory have a small memory leak. In practice it's probably not
> much of an issue but worth fixing as it's one line.
--
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