← Back to team overview

maria-developers team mailing list archive

Re: Rev 3967: MDEV-5597 - Reduce usage of LOCK_open: LOCK_flush


Hi, Sergey!

On Jan 31, Sergey Vojtovich wrote:
> > You wait here on a condition, how do you know there's FLUSH TABLES (or
> > anything at all) running that will signal this condition?
> 1. we're protected by exclusive metadata lock, so the only possible statement
>    that may cause concurrency issues should be FLUSH TABLES (in fact there are
>    more cases, like ha_table_exists()).
> 2. share->tdc.all_tables holds only tables owned by current thread (or empty),
>    there are assertions for this above.
> 3. if concurrent FLUSH TABLES removed some TABLE instances from tdc.all_tables,
>    but didn't close them yet, share ref_count reflects that.
> 4. this FLUSH TABLES must call intern_close_table(), which will eventually call
>    tdc_release_share()/mysql_cond_broadcast().
> That's it.

I see. Then, I suppose, it's ok to push.
But please add this your explanation in a comment.