You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Tim Bain (JIRA)" <ji...@apache.org> on 2018/03/26 04:05:00 UTC

[jira] [Updated] (AMQ-6938) KahaDB's ignoreMissingJournalFiles argument doesn't actually ignore missing journal files

     [ https://issues.apache.org/jira/browse/AMQ-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Bain updated AMQ-6938:
--------------------------
    Description: 
It was reported on the user mailing list ([http://activemq.2283324.n4.nabble.com/Re-failed-to-start-ActiveMQ-td4737631.html)] that a user is seeing the broker fail to start due to "java.io.IOException: Could not locate data file /data/kahadb/db-531.log" even though ignoreMissingJournalFiles is set to true. Presumably the purpose of that option is to allow the broker to ignore missing journal files (otherwise we chose poorly when naming the option and then failed to document it adequately on the wiki), which means the option doesn't work properly in all situations.

Looking at the code on master as of 3/25/2018, org.apache.activemq.store.kahadb.MessageDatabase.recover() calls journal.getNextLocation(null) on line 677, which will throw the exception in question when DataFile.getDataFile() is called. This call to journal.getNextLocation() occurs outside of the while loop, whereas the ignoreMissingJournalFiles value is only checked in the catch block within the while loop, so we do not consider the ignoreMissingJournalFiles value in the call to getNextLocation(), even though missing journal files can cause getNextLocation() to fail.

  was:
It was reported on the user mailing list that a user is seeing the broker fail to start due to "java.io.IOException: Could not locate data file /data/kahadb/db-531.log" even though ignoreMissingJournalFiles is set to true. Presumably the purpose of that option is to allow the broker to ignore missing journal files (otherwise we chose poorly when naming the option and then failed to document it adequately on the wiki), which means the option doesn't work properly in all situations.

Looking at the code on master as of 3/25/2018, org.apache.activemq.store.kahadb.MessageDatabase.recover() calls journal.getNextLocation(null) on line 677, which will throw the exception in question when DataFile.getDataFile() is called. This call to journal.getNextLocation() occurs outside of the while loop, whereas the ignoreMissingJournalFiles value is only checked in the catch block within the while loop, so we do not consider the ignoreMissingJournalFiles value in the call to getNextLocation(), even though missing journal files can cause getNextLocation() to fail.


> KahaDB's ignoreMissingJournalFiles argument doesn't actually ignore missing journal files
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-6938
>                 URL: https://issues.apache.org/jira/browse/AMQ-6938
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: KahaDB
>    Affects Versions: 5.13.1
>            Reporter: Tim Bain
>            Priority: Major
>
> It was reported on the user mailing list ([http://activemq.2283324.n4.nabble.com/Re-failed-to-start-ActiveMQ-td4737631.html)] that a user is seeing the broker fail to start due to "java.io.IOException: Could not locate data file /data/kahadb/db-531.log" even though ignoreMissingJournalFiles is set to true. Presumably the purpose of that option is to allow the broker to ignore missing journal files (otherwise we chose poorly when naming the option and then failed to document it adequately on the wiki), which means the option doesn't work properly in all situations.
> Looking at the code on master as of 3/25/2018, org.apache.activemq.store.kahadb.MessageDatabase.recover() calls journal.getNextLocation(null) on line 677, which will throw the exception in question when DataFile.getDataFile() is called. This call to journal.getNextLocation() occurs outside of the while loop, whereas the ignoreMissingJournalFiles value is only checked in the catch block within the while loop, so we do not consider the ignoreMissingJournalFiles value in the call to getNextLocation(), even though missing journal files can cause getNextLocation() to fail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)