[ https://issues.apache.org/jira/browse/AMQ-9254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17718372#comment-17718372 ]
Christopher L. Shannon commented on AMQ-9254: --------------------------------------------- So to be clear, the issue is the actual file is larger than dataFile.length? That seems to be a bit of a problem if the file is larger than what is reported so I wonder if we should be smarter here. I need to look how that value is set but I am guessing the length is coming from max length setting or some sort of offset by the read messages etc Trying to read past the real max length is an actual problem and I don't think we should be swallowing that error just because in this one case it would succeed. In other cases it could be corruption. I'm wondering if we should do something where we check the real file length as an extra check before failing. If we are truly exceeding the real file length we need to throw an exception and shut down. > KahaDB minor fix when db files may be larger than max length > ------------------------------------------------------------ > > Key: AMQ-9254 > URL: https://issues.apache.org/jira/browse/AMQ-9254 > Project: ActiveMQ > Issue Type: Task > Reporter: Matt Pavlovich > Priority: Minor > > Log message: > {noformat} > Caused by: java.io.IOException: Invalid location size: 54:33554460, size: 2412 > at > org.apache.activemq.store.kahadb.disk.journal.DataFileAccessor.readRecord(DataFileAccessor.java:88) > ~[?:?] > at > org.apache.activemq.store.kahadb.disk.journal.Journal.read(Journal.java:953) > ~[?:?] > at > org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:1197) > ~[?:?] > at > org.apache.activemq.store.kahadb.KahaDBStore.loadMessage(KahaDBStore.java:1401) > ~[?:?] > ... 74 more > {noformat} > db-54.log size: 33556877 > Note: This read would have succeeded otherwise. > Reproducible test case: > ref: https://github.com/mattrpav/activemq-jira-9254 -- This message was sent by Atlassian Jira (v8.20.10#820010)