You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dingwen Yuan <pd...@gmail.com> on 2007/09/12 08:44:28 UTC

Master/Slave jdbc row lock can't be auto-released

Hi folks,

We have tested master/slave configuration with pure jdbc persistence and the
db used are mysql and postgres. When we plugged out the electric cable of
the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be
released. So later neither of the machines can get the lock and become the
master? Is the a known problem? Does any database support row lock auto
release?

Thanks

Dingwen Yuan

Re: Master/Slave jdbc row lock can't be auto-released

Posted by Dingwen Yuan <pd...@gmail.com>.
Thank you Mario,

Killing the process also works for me. But I seems when suddenly a power
failure occurs, postgres and mysql have no means to release the lock.

Dingwen Yuan



2007/9/13, Mario Siegenthaler <ms...@inventsoft.ch>:
>
> This works for me. As soon as the database detects the loss of the
> connection it frees the lock. Tested with MySQL and SQL-Server. I
> didn't plug the power but instead did a kill -9 or unplugged the
> network cable on the master.
> I think this is supposed to be a feature of any database or else you'd
> end up with a lot of locked rows if some clients terminate ungraceful.
>
> Mario
>
> On 9/12/07, Dingwen Yuan <pd...@gmail.com> wrote:
> > Hi folks,
> >
> > We have tested master/slave configuration with pure jdbc persistence and
> the
> > db used are mysql and postgres. When we plugged out the electric cable
> of
> > the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be
> > released. So later neither of the machines can get the lock and become
> the
> > master? Is the a known problem? Does any database support row lock auto
> > release?
> >
> > Thanks
> >
> > Dingwen Yuan
> >
>

Re: Master/Slave jdbc row lock can't be auto-released

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
This works for me. As soon as the database detects the loss of the
connection it frees the lock. Tested with MySQL and SQL-Server. I
didn't plug the power but instead did a kill -9 or unplugged the
network cable on the master.
I think this is supposed to be a feature of any database or else you'd
end up with a lot of locked rows if some clients terminate ungraceful.

Mario

On 9/12/07, Dingwen Yuan <pd...@gmail.com> wrote:
> Hi folks,
>
> We have tested master/slave configuration with pure jdbc persistence and the
> db used are mysql and postgres. When we plugged out the electric cable of
> the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be
> released. So later neither of the machines can get the lock and become the
> master? Is the a known problem? Does any database support row lock auto
> release?
>
> Thanks
>
> Dingwen Yuan
>