[
https://issues.apache.org/jira/browse/ARTEMIS-4967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17954884#comment-17954884
]
ASF subversion and git services commented on ARTEMIS-4967:
----------------------------------------------------------
Commit 9b574af34154e6650ff258c726d6ebcaf7351537 in activemq-artemis's branch
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=9b574af341 ]
ARTEMIS-4967 Remove unreachable code
Remove code that has been unreachable since original donation
so should not have any side effect at this point.
> store.commit(txDeleteCursorOnReload); may not be reachable in processReload()
> method
> ------------------------------------------------------------------------------------
>
> Key: ARTEMIS-4967
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4967
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Suhov Roman
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> File:
> [https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java]
> Line: 700 - 702
> store.commit(txDeleteCursorOnReload); may be unreachable in this
> processReload() method, especially if the txDeleteCursorOnReload variable
> remains at -1 after the loop and never changes to a value >= 0.
> The code did not detect a change in the value of the txDeleteCursorOnReload
> variable. It is possible that the application logic does not require a
> transaction commit after loading data from recoveredACK.
> If the txDeleteCursorOnReload variable remains at -1 after the loop, then the
> call to store.commit(txDeleteCursorOnReload); in this method will indeed be
> unreachable.
>
--
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