You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (Jira)" <ji...@apache.org> on 2024/08/08 16:09:00 UTC

[jira] [Created] (AMQ-9547) PageFile can call setLength() on the recovery file which always throws an exception

Christopher L. Shannon created AMQ-9547:
-------------------------------------------

             Summary: PageFile can call setLength() on the recovery file which always throws an exception
                 Key: AMQ-9547
                 URL: https://issues.apache.org/jira/browse/AMQ-9547
             Project: ActiveMQ Classic
          Issue Type: Bug
          Components: KahaDB
    Affects Versions: 6.1.3, 5.18.5
            Reporter: Christopher L. Shannon
            Assignee: Christopher L. Shannon
             Fix For: 5.18.6, 6.1.4


There are 3 places in PageFile that call setLength() in RecoverableRandomAccessFile. This method was changed in AMQ-5578 so that it always throws an exception when called. This method should just be removed entirely since it always throws an error and in the places where it is used we need to either stop calling it if we can or throw an exception if the length is unexpected. 

Currently when KahaDB tries to redo recovery updates, if the file length is encountered as 0 it will call this method which leads to throwing an exception. This causes the store to detect the error and rebuild the index. We should be able to just continue without calling this method and recover.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact