mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
mdev-7802-binlog_groupcommit_stats
Update the description of each test case as to why it is counted in the correct binlog_group_commit_trigger_* variable. Updated rpl_parallel_multilevel2.test to identify that 3 groups occur in statement and mixed replication and one group in row based replication.
This commit is contained in:
@ -51,6 +51,11 @@ reap;
|
||||
SET @b= unix_timestamp(current_timestamp()) - unix_timestamp(@a);
|
||||
SELECT IF(@b < 20, "Ok", CONCAT("Error: too much time elapsed: ", @b, " seconds >= 20"));
|
||||
|
||||
# All connections are to the same server. One transaction occurs on con1. It is
|
||||
# commited before con2 is started. con2 transaction violates the unique key contraint. This
|
||||
# type of group commit is binlog_group_commit_trigger_lock_wait so that further con2
|
||||
# transactions will occur afterwards as they may be as result of the ER_DUP_ENTRY on the
|
||||
# application side.
|
||||
# before: binlog_group_commit=0, binlog_group_commit_trigger_count=0
|
||||
# before: binlog_group_commit_trigger_timeout=0, binlog_group_commit_trigger_lock_wait=0
|
||||
# after: binlog_group_commit+1 by reason of binlog_group_commit_trigger_lock_wait+1
|
||||
@ -90,6 +95,10 @@ reap;
|
||||
SET @b= unix_timestamp(current_timestamp()) - unix_timestamp(@a);
|
||||
SELECT IF(@b < 20, "Ok", CONCAT("Error: too much time elapsed: ", @b, " seconds >= 20"));
|
||||
|
||||
# All connections are to the same server. 3 non-conflicting transaction occur
|
||||
# on each connection. The binlog_commit_wait_count=3 at the start therefore 1
|
||||
# group is committed by virtue of reaching 3 transactions. Hence
|
||||
# binlog_group_commit_trigger_count is incremented.
|
||||
# before: binlog_group_commit=1, binlog_group_commit_trigger_count=0
|
||||
# before: binlog_group_commit_trigger_timeout=0, binlog_group_commit_trigger_lock_wait=1
|
||||
# after: binlog_group_commit+1 by reason of binlog_group_commit_trigger_count+1
|
||||
@ -136,6 +145,9 @@ reap;
|
||||
SET @b= unix_timestamp(current_timestamp()) - unix_timestamp(@a);
|
||||
SELECT IF(@b < 20, "Ok", CONCAT("Error: too much time elapsed: ", @b, " seconds >= 20"));
|
||||
|
||||
# All connections are to the same server. con2 and con3 updates are aquiring
|
||||
# the same row lock for a=1. Either con2 or con3 will be in a lock wait
|
||||
# thefore the binlog_group_commit_trigger_lock_wait is incremented.
|
||||
# before: binlog_group_commit=2, binlog_group_commit_trigger_count=1
|
||||
# before: binlog_group_commit_trigger_timeout=0, binlog_group_commit_trigger_lock_wait=1
|
||||
# after: binlog_group_commit+1 by reason of binlog_group_commit_trigger_lock_wait+1
|
||||
@ -163,6 +175,8 @@ reap;
|
||||
SET @b= unix_timestamp(current_timestamp()) - unix_timestamp(@a);
|
||||
SELECT IF(@b < 20, "Ok", CONCAT("Error: too much time elapsed: ", @b, " seconds >= 20"));
|
||||
|
||||
# The con1 and con2 transactions above are combined with the 'send UPDATE t1 SET b=b+10 WHERE a=1;'
|
||||
# on con3 from the previous block. So we have 3 so this is a count based group.
|
||||
# before: binlog_group_commit=3, binlog_group_commit_trigger_count=1
|
||||
# before: binlog_group_commit_trigger_timeout=0, binlog_group_commit_trigger_lock_wait=2
|
||||
# after: binlog_group_commit+1 by reason of binlog_group_commit_trigger_count+1
|
||||
@ -190,6 +204,10 @@ SET @b= unix_timestamp(current_timestamp()) - unix_timestamp(@a);
|
||||
SELECT IF(@b < 4, CONCAT("Error: too little time elapsed: ", @b, " seconds < 4"),
|
||||
IF(@b < 20, "Ok", CONCAT("Error: too much time elapsed: ", @b, " seconds >= 20")));
|
||||
|
||||
# con1 pushes 1 transaction. The count was for 3 to occur before a group commit.
|
||||
# The timeout is 5 seconds but we allow between 4 and 20 because of the fragile nature
|
||||
# of time in test. This is a timeout causing the commit so binlog_group_commit_trigger_timeout
|
||||
# is incremented.
|
||||
# before: binlog_group_commit=4, binlog_group_commit_trigger_count=2
|
||||
# before: binlog_group_commit_trigger_timeout=0, binlog_group_commit_trigger_lock_wait=2
|
||||
# after: binlog_group_commit+1 by reason of binlog_group_commit_trigger_timeout+1
|
||||
|
Reference in New Issue
Block a user