KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
This post was updated on .
Hi,
I was testing to see if kahadb created by ActiveMQ 5.10 can be used with ActiveMQ 5.11.
ActiveMQ 5.11 starts up fine but is not able to access the older persistent messages which were stored when KahaDB was being used with ActiveMQ 5.10. Is this expected?

Also I see following directories in kahadb(i am using Multi-Kahadb)

Running with ActiveMQ 5.10:
/u/choudhab/activemq/kahadb>ls
0     queue#3a#2f#2fdesflow.#3e  queue#3a#2f#2fpricing.#3e  topic#3a#2f#2fcometd.#3e   topic#3a#2f#2fpricing.#3e  txStore
lock  queue#3a#2f#2fgear.#3e     queue#3a#2f#2fseed.#3e     topic#3a#2f#2fdportal.#3e  topic#3a#2f#2fseed.#3e

Running with ActiveMQ 5.11:
/u/choudhab/activemq/kahadb>ls
#210  lock                       queue#3a#2f#2fgear.#3e     queue#3a#2f#2fseed.#3e    topic#3a#2f#2fdportal.#3e  topic#3a#2f#2fseed.#3e
0     queue#3a#2f#2fdesflow.#3e  queue#3a#2f#2fpricing.#3e  topic#3a#2f#2fcometd.#3e  topic#3a#2f#2fpricing.#3e  txStore

I see that an additional directory #210 is created. Why is it created and what is the purpose of this?

The persistence messages that were sent when running with 5.10 are still present in the Kahadb.

Normally, ActiveMQ retains the destination information across restarts.
But When I do this test, jconsole doesn't show any of the previously created destinations(during 5.10 run). Is this also expected?

Is this version switch supposed to be done with clean KahaDB state?

Thanks,
Abhi
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
This post was updated on .
Ping.
Can some one please explain the above observations/changes in kahadb when moving from ActiveMQ 5.10 to ActiveMQ 5.11? Are there any other changes?

Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

Tom_Z
In reply to this post by xabhi
Hi Ahbi,

what is the result of your research?

Tom
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
ActiveMQ has changed the name of the default persistent adapter from 0 to #210 in ActiveMQ 5.11.1.
ActiveMQ v5.11.1 will not read messages from 0 directory as there is no persistence adapter defined for that and hence they are kind of lost.

Thanks,
Abhi
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

Tom_Z
Hi Abhi,

thanks for sharing your findings.

Did you find any documentation on this problem? Is this change accidental or is there a reason?

Tom
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

Tim Bain
I just looked through all the 5.11.x JIRA issues and don't see any that
describe this change outright nor any that I would have expected to require
making the change.  Abhi, did you find the code change that causes the
change you describe?  If so, can you see if the commit includes the number
of the JIRA issue under which it was fixed?

Tim
On May 5, 2015 7:24 AM, "Tom_Z" <[hidden email]> wrote:

> Hi Abhi,
>
> thanks for sharing your findings.
>
> Did you find any documentation on this problem? Is this change accidental
> or
> is there a reason?
>
> Tom
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/KahabDB-compatibility-issue-between-ActiveMQ-5-10-and-ActiveMQ-5-11-tp4692008p4696089.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
Hi Tim,
I don't have any specific idea as to what changed between the versions but i can point you to the part of code that does it.

In my mulitKahaDB adapater configuration I have this entry:
                   
                    <amq:filteredKahaDB>
                        <amq:persistenceAdapter>
                            <amq:kahaDB/>
                        </amq:persistenceAdapter>
                    </amq:filteredKahaDB>

Which essentially defines persistence adapter for all destinations, which corresponds to matchAll destination in MultiKahaDBPersistenceAdapter class:

final static ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")});

This is the call IOHelper.toFileSystemSafeName(destination.getQualifiedName()); in nameFromDestinationFilter() function returns the directory name for the kahadb adapter.

This call earlier used to return 0 and now it returns #210.

You can run below two lines of code to check this with different versions of ActiveMQ:

 final ActiveMQDestination matchAll =
           new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")});
        System.out.println(IOHelper.toFileSystemSafeName(matchAll.getQualifiedName()));


Thanks,
Abhi
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
Hi Tim,

Did you got a chance to look at this?

Thanks,
Abhi
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

Tim Bain
I haven't, but what I would have done is grabbed the 5.11 code, walked
through it from the starting point you referenced till I figured out where
the value of 210 came from, then found that code in GitHub and looked at
the commit history to see who changed it, when, and why.  You're completely
capable of doing that yourself (plus you have a running configuration that
you can step through in a debugger, which I don't), and since I've never
used KahaDB you probably know the code better than I do.  So no, I haven't
had time to look at it, but I think it'd be better for you to investigate
this anyway.

When you know at least what commit caused the change (and hopefully its
comment will make clear which JIRA number the commit was tied to), if you
post that info back here, someone can update release notes accordingly
and/or implement a fix if appropriate.
On May 15, 2015 12:36 AM, "xabhi" <[hidden email]> wrote:

> Hi Tim,
>
> Did you got a chance to look at this?
>
> Thanks,
> Abhi
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/KahabDB-compatibility-issue-between-ActiveMQ-5-10-and-ActiveMQ-5-11-tp4692008p4696555.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: KahabDB compatibility issue between ActiveMQ 5.10 and ActiveMQ 5.11

xabhi
I took some more time out and found that this inconsistency was not because of any change in KahaDB but because of change in physicalName of AnyDestination from "0" to "!0".

The commit refers to this JIRA issue: https://issues.apache.org/jira/browse/AMQ-5450

Hope this helps.

Thanks,
Abhi