Commit 88eb572c authored by Marc Alff's avatar Marc Alff

Bug#12603341 - PERFSCHEMA.RELAYLOG FAILS SPORADICALLY IN PB2

Before this fix, the test performance_schema.relaylog would fail
with sporadic failures related to statistics on update_cond.

The reason for these failures is that thread scheduling makes
impossible to predict if instrumented conditions will be used on not.

The fix is to relax the test case, to not collect statistics about:
- wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond
- wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
parent 6ebb38a2
......@@ -52,10 +52,11 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
where event_name like "%MYSQL_BIN_LOG%"
and event_name not like "%MYSQL_BIN_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect no slave relay log"
......@@ -68,9 +69,10 @@ EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_W
wait/io/file/sql/relaylog 0 0 0 0
wait/io/file/sql/relaylog_index 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
"============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
......@@ -123,10 +125,11 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
where event_name like "%MYSQL_BIN_LOG%"
and event_name not like "%MYSQL_BIN_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect a slave relay log"
......@@ -162,8 +165,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
include/stop_slave.inc
......@@ -41,6 +41,8 @@ drop table test.t1;
# To ensure robustness:
# - log file rotation is limited to file .000001 and .000002
# - statistics are normalized to "NONE" or "MANY"
# - statistics on ::update_cond conditions are not collected,
# since this is too much dependent on execution.
#
connection master;
......@@ -84,7 +86,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
where event_name like "%MYSQL_BIN_LOG%"
and event_name not like "%MYSQL_BIN_LOG::update_cond"
order by event_name;
-- echo "Expect no slave relay log"
......@@ -95,7 +99,9 @@ select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
sync_slave_with_master;
-- echo "============ Performance schema on slave ============"
......@@ -142,7 +148,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
where event_name like "%MYSQL_BIN_LOG%"
and event_name not like "%MYSQL_BIN_LOG::update_cond"
order by event_name;
-- echo "Expect a slave relay log"
......@@ -173,7 +181,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
--source include/stop_slave.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment