Thread killing logic

5 views
Skip to first unread message

Eric Bergen

unread,
Sep 2, 2010, 6:15:04 PM9/2/10
to flipper-devel
I was reading through the flipper code and found this:

if (defined $rhh_processlist->{$thread_id}->{Info}
&& $rhh_processlist->{$thread_id}->{Info} =~ /^\s*(\/\*.*?\*
\/)?\s*(INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|ALTER|REPAIR|OPTIMIZE|
ANALYZE|CHECK)/si) {

What's the purpose of making sure a thread is running a query before
killing it instead of just killing everything except the current
connections thread and the system users?

-Eric

Jeremy Cole

unread,
Sep 2, 2010, 6:35:05 PM9/2/10
to flippe...@googlegroups.com
All,

Even though Eric already has an answer via IM, for the sake of the
mailing list, I'll reply here as well:

The code below is actually checking which queries to *skip* killing,
giving them up to 10 seconds ($max_delay) to die before finally
killing them anyway. The hope is to allow the failover process to be
a bit more "nice" to potentially dangerous-to-kill queries.

Regards,

Jeremy

> --
> You received this message because you are subscribed to the Google Groups "flipper-devel" group.
> To post to this group, send email to flippe...@googlegroups.com.
> To unsubscribe from this group, send email to flipper-deve...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/flipper-devel?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages