lraczko commented on PR #984:
URL: https://github.com/apache/activemq/pull/984#issuecomment-1580192390

   When you have configuration like: 
   `<persistenceAdapter>
        <mKahaDB directory="${activemq.data}/kahadb">
                <filteredPersistenceAdapters>
                        <!-- kahaDB per destinations -->
                        <filteredKahaDB perDestination="true">
                                <persistenceAdapter>
                                        <kahaDB>
                                                ...
                                        </kahaDB>
                                </persistenceAdapter>
                        </filteredKahaDB>
                        <filteredKahaDB topic="STOMP.>">
                                <persistenceAdapter>
                                        <kahaDB>
                                                ...
                                        </kahaDB>
                                </persistenceAdapter>
                        </filteredKahaDB>
                </filteredPersistenceAdapters>
        </mKahaDB>
   </persistenceAdapter>
   `
   On first start everything works fine, but after restart in 
   _org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter#doStart_
   you first go through 'matchAll' and for this example topic store in 
   
_org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter#registerExistingAdapter_
   you register and start adapter (as destinations.size() != 0)
   and when you get to 
   `   File[] candidates = 
template.getPersistenceAdapter().getDirectory().listFiles(destinationNames);
           if (candidates != null) {
               for (File candidate : candidates) {
                   registerExistingAdapter(template, candidate);
               }
           }`
   in mentioned 'doStart' then it will try to register same adapter second time 
and corrupt index. 
   And after that another restart will make AMQ fail to start because of that 
corrupted index. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to