List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:February 24 2012 8:16pm
Subject:Re: handlerton info method locking
View as plain text  
Hi, John!

On Feb 24, John Esmet wrote:
> Any insight on this? I'm wondering if it's necessary to do my own
> table-level locking (say, for shared variables among threads on the
> same table) inside the handlerton's info method.

Yes, it is. It could be something simple, like a mutex that protects
shared data, but you need to take care of locking it.

There's HA_STATUS_NO_LOCK though. But it doesn't mean that all locking
is done for you.  See the comment in my_base.h.

Regards,
Sergei

> On Thu, Feb 23, 2012 at 3:07 PM, John Esmet <john.esmet@stripped> wrote:
> > Hello all,
> >
> > What is the expected locking behavior of 'show table status' and the
> > ::info method in the handlerton? I'm observing unlocked access to
> > ::info when other threads have TL_WRITE locks on the table, so I'm
> > curious if it is normal/expected for threads to call ::info on a
> > write-locked table.
Thread
handlerton info method lockingJohn Esmet23 Feb
  • Re: handlerton info method lockingJohn Esmet24 Feb
    • Re: handlerton info method lockingSergei Golubchik24 Feb