← Back to team overview

maria-developers team mailing list archive

Re: Rev 3966: MDEV-5492 - Reduce usage of LOCK_open: TABLE::in_use


Hi, Sergey!

On Jan 29, Sergey Vojtovich wrote:
> At lp:maria/10.0
> ------------------------------------------------------------
> revno: 3966
> revision-id: svoj@xxxxxxxxxxx-20140129083115-jwye7zfyncrq9crs
> parent: svoj@xxxxxxxxxxx-20140124075326-d7twer07e0bu42b5
> committer: Sergey Vojtovich <svoj@xxxxxxxxxxx>
> branch nick: 10.0
> timestamp: Wed 2014-01-29 12:31:15 +0400
> message:
>   MDEV-5492 - Reduce usage of LOCK_open: TABLE::in_use
>   Move TABLE::in_use out of LOCK_open.
>   This is done with assumtion that foreign threads accessing TABLE::in_use
>   will only need consistent value _after_ marking table for flush and purging
>   unused table instances. In this case TABLE::in_use will always point to a
>   valid thread object.

I believe I was able to understand what you were doing here :)
Seems ok.

The assumption above looks a bit risky without any way to enforce it.

Perhaps you could make in_use private (renaming to, say, m_in_use)
and add an inline getter method TABLE::in_use() that in debug builds
will assert that your assumption holds?


Follow ups