maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08569
Re: 8a0f331: MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Hi, Sergey!
On May 13, Sergey Vojtovich wrote:
> >
> > 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.
> I can suggest 3 alternatives:
> - add thd_killed_current() (now or on demand?)
> - add current_thd() to API (now or on demand?)
> - keep if (!thd), even though it makes mostly useless branch per row
>
> Which one do you like most?
"on demand" one. Let's go with your patch. But add a comment (near
DBUG_ASSERT(thd) or in the function comment) that if we'll get a use
case where a plugin needs to call thd_killed and where it has no thd
available, we can either add thd_killed_current() or current_thd() or do
if (!thd).
Regards,
Sergei
References