[ 
https://issues.apache.org/jira/browse/AMQ-6567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883374#comment-15883374
 ] 

ASF subversion and git services commented on AMQ-6567:
------------------------------------------------------

Commit 1a67318fe97b1339ea1fbbd74cc7232c46e8f27c in activemq's branch 
refs/heads/activemq-5.14.x from [~gtully]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=1a67318 ]

[AMQ-6567] ensure gc file removal/move is completed after index updates to 
avoid dangling index referenced on partial failure. Fix and test

(cherry picked from commit 20522394cc747e64bd9f87e2e0b64d886c4dec62)


> Broker failure when deleting files in gc can cause missing journal errors on 
> restart
> ------------------------------------------------------------------------------------
>
>                 Key: AMQ-6567
>                 URL: https://issues.apache.org/jira/browse/AMQ-6567
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: KahaDB
>    Affects Versions: 5.14.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.15.0
>
>
> A broker stop or failure while deleting journal data files or archiving data 
> files can result in partial deletion and no index updates. 
> Leading to errors on restart of the form: 
> java.io.IOException: Detected missing journal files.
> {code}ERROR BrokerService                  - Failed to start Apache ActiveMQ 
> (localhost, null)
> java.io.IOException: Detected missing journal files. [1, 2, 3, 4]
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.recoverIndex(MessageDatabase.java:978)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase$5.execute(MessageDatabase.java:714)
>       at 
> org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.recover(MessageDatabase.java:711)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.open(MessageDatabase.java:464)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:483)
>       at 
> org.apache.activemq.store.kahadb.MessageDatabase.doStart(MessageDatabase.java:297)
>       at 
> org.apache.activemq.store.kahadb.KahaDBStore.doStart(KahaDBStore.java:218)
>       at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
>       at 
> org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:226)
>       at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
>       at 
> org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter(BrokerService.java:674)
>       at 
> org.apache.activemq.broker.BrokerService.startPersistenceAdapter(BrokerService.java:658)
>       at 
> org.apache.activemq.broker.BrokerService.start(BrokerService.java:622){code}
> The file deletion of the gc candidates is part of the index transaction, so 
> partial deletion can occur but the index does not get updated.
> For gc, the index updates need to complete to remove references to the data 
> files first. Only after a successful update to the index should the removal 
> proceed. If the removal fails, on restart the orphaned data files will get gc 
> ed.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to