← Back to team overview

maria-developers team mailing list archive

Re: 8a0f331: MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO

 

Hi, Sergey!

On May 13, Sergey Vojtovich wrote:
> > >  
> > > -    while (is_on() && !thd_killed(NULL))
> > > +    while (is_on() && !thd_killed(current_thd))
> > 
> > thd_killed() is a function of the kill_statement service
> > (see include/mysql/service_kill_statement.h). It is created for plugins
> > to use. But current_thd is not. Plugins generally have no access to it.
> Speaking of general sanity: there's no other code that does thd_killed(NULL).
> Speaking of semisync plugin sanity: it does lots of direct server function calls
> already, including current_thd.
> 
> Do you think it is worth to preserve this thd_killed(NULL)?
> I believe it is quite easy to extend replication plugin interface so that THD
> is passed through. But is it worth it?

There's no need to change semisync plugin, if it uses current_thd, then
it can also use it for thd_killed().

But if you'll require thd_killed() always to take THD as an argument,
then other plugins (that work strictly within plugin api limits)
won't be able to check killed flag in places where THD isn't available.
May be it's not a problem, though, I don't know.

Regards,
Sergei


Follow ups

References