You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Pvbouwel <pe...@contribute.be> on 2012/03/20 12:19:52 UTC
10 seconds wait time for kahadb lock
Is there a reason why it is not possible to set the timeout for brokers who
want to acquire a lock on the kahadb?
When I look into the source code (KahaPersistenceAdapter.java). I see:
private static final int STORE_LOCKED_WAIT_DELAY = 10 * 1000;
I wanted to set this wait_delay using a configuration parameter but this
isn't possible.
Is there a special reason why this is the case? What will happen if I
modify the value in code and I recompile? Will everything still work?
Greetings,
Peter
--
View this message in context: http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4488418.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
stop ML
Posted by Nishizawa Kenji <Ni...@exc.epson.co.jp>.
To remove your address from the list, send a message to:
<us...@activemq.apache.org>
not mail stop
Re: Re:Re: 10 seconds wait time for kahadb lock
Posted by Pvbouwel <pe...@contribute.be>.
I haven't done any real testing regarding performance but I don't think the
parameter would impact the performance greatly?
The Broker that has the lock can just continue working with the kahadb (as
if there was no slave). And the Slave is polling the the kahadb more often
(more requests to the shared Filesystem) but those requests shouldn't eat a
lot of bandwidth. It will only check whether the file is still locked. But
performance impact will be very different from system to system so I guess
you should test it on a setup for which you want to know the impact.
Anywasy for testing I do recommend to chose an appropriate loglevel
otherwise you will get a lot of entries like " INFO | Database
/opt/amq/data/kahadb/lock is locked... waiting 0 seconds for the database to
be unlocked. Reason: java.io.IOException: File '/opt/amq/data/kahadb/lock'
could not be locked.". So make sure you don't log INFO messages :-).
If I find the time to do some testing, I'll post the results.
--
View this message in context: http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4498208.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re:Re: 10 seconds wait time for kahadb lock
Posted by lzr <js...@163.com>.
Could you please to interpret how the parameter affect the performance of ActiveMQ?
thanks a lot,
Zhuran Li
At 2012-03-21 22:54:14,"Dejan Bosanac" <de...@nighttale.net> wrote:
>Thanks for closing the loop!
>
>Regards
>--
>Dejan Bosanac
>Senior Software Engineer | FuseSource Corp.
>dejanb@fusesource.com | fusesource.com
>skype: dejan.bosanac | twitter: @dejanb
>blog: http://www.nighttale.net
>ActiveMQ in Action: http://www.manning.com/snyder/
>
>
>
>On Wed, Mar 21, 2012 at 8:49 AM, Pvbouwel <pe...@contribute.be>wrote:
>
>> To be clear for other people wanting to change the wait time for kahadb
>> lock:
>> dejanb his answer was 100 % correct. I had a typo in my configuration
>> file.
>> If you want to change the time-out just change persistenceAdapter in your
>> activemq.xml to look like:
>>
>>
>>
>> The value of databaseLockedWaitDelay is in miliseconds so this
>> configuration
>> will wait 1 second before trying a new attempt to get the lock.
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4491519.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
Re: 10 seconds wait time for kahadb lock
Posted by Dejan Bosanac <de...@nighttale.net>.
Thanks for closing the loop!
Regards
--
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Wed, Mar 21, 2012 at 8:49 AM, Pvbouwel <pe...@contribute.be>wrote:
> To be clear for other people wanting to change the wait time for kahadb
> lock:
> dejanb his answer was 100 % correct. I had a typo in my configuration
> file.
> If you want to change the time-out just change persistenceAdapter in your
> activemq.xml to look like:
>
>
>
> The value of databaseLockedWaitDelay is in miliseconds so this
> configuration
> will wait 1 second before trying a new attempt to get the lock.
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4491519.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Re: 10 seconds wait time for kahadb lock
Posted by Pvbouwel <pe...@contribute.be>.
To be clear for other people wanting to change the wait time for kahadb lock:
dejanb his answer was 100 % correct. I had a typo in my configuration file.
If you want to change the time-out just change persistenceAdapter in your
activemq.xml to look like:
The value of databaseLockedWaitDelay is in miliseconds so this configuration
will wait 1 second before trying a new attempt to get the lock.
--
View this message in context: http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4491519.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 10 seconds wait time for kahadb lock
Posted by Pvbouwel <pe...@contribute.be>.
OK, apparently you had a little typo. It should be:
databaseLockedWaitDelay
Thanks a lot! Now I can do exactly what I wanted to do!
--
View this message in context: http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4488859.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 10 seconds wait time for kahadb lock
Posted by Pvbouwel <pe...@contribute.be>.
If I try that I get the following error:
Attribute 'databaseLockWaitDelay' is not allowed to appear in element
'kahaDB'
By the way: I am using activemq-5.4.3.
--
View this message in context: http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4488847.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 10 seconds wait time for kahadb lock
Posted by Dejan Bosanac <de...@nighttale.net>.
If you're trying to use KahaDB than
<kahaDB databaseLockedWaitDelay="xxx" ... />
should work for you
Regards
--
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Tue, Mar 20, 2012 at 12:19 PM, Pvbouwel <pe...@contribute.be>wrote:
> Is there a reason why it is not possible to set the timeout for brokers who
> want to acquire a lock on the kahadb?
>
> When I look into the source code (KahaPersistenceAdapter.java). I see:
>
> private static final int STORE_LOCKED_WAIT_DELAY = 10 * 1000;
>
> I wanted to set this wait_delay using a configuration parameter but this
> isn't possible.
>
> Is there a special reason why this is the case? What will happen if I
> modify the value in code and I recompile? Will everything still work?
>
> Greetings,
>
> Peter
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/10-seconds-wait-time-for-kahadb-lock-tp4488418p4488418.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>