~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to lib/GenTest/Reporter/Deadlock.pm

merge from internal tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
use constant CONNECT_TIMEOUT_THRESHOLD          => 60;
20
20
 
21
21
# Minimum lifetime of a query before it is considered suspicios
22
 
use constant QUERY_LIFETIME_THRESHOLD           => 300; # Seconds = 5 minutes
 
22
use constant QUERY_LIFETIME_THRESHOLD           => 600; # Seconds
23
23
 
24
24
# Number of suspicious queries required before a deadlock is declared
25
 
use constant STALLED_QUERY_COUNT_THRESHOLD      => 3;
 
25
use constant STALLED_QUERY_COUNT_THRESHOLD      => 5;
26
26
 
27
27
sub monitor {
28
28
        my $reporter = shift;
80
80
 
81
81
                foreach my $status_query (
82
82
                        "SHOW PROCESSLIST",
83
 
                        "SHOW ENGINE INNODB STATUS",
84
 
                        "SHOW OPEN TABLES"
 
83
                        "SHOW ENGINE INNODB STATUS"
 
84
                        # "SHOW OPEN TABLES" - disabled due to bug #46433
85
85
                ) {
86
86
                        say("Executing $status_query:");
87
87
                        my $status_result = $dbh->selectall_arrayref($status_query);