-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcheckpointing.test
More file actions
85 lines (73 loc) · 2.52 KB
/
checkpointing.test
File metadata and controls
85 lines (73 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--source ../include/have_binsrv.inc
--source ../include/v80_v84_compatibility_defines.inc
--echo *** Resetting replication at the very beginning of the test.
--disable_query_log
eval $stmt_reset_binary_logs_and_gtids;
--enable_query_log
--echo *** Creating a simple table.
CREATE TABLE t1(
id SERIAL,
val CHAR(64) CHARACTER SET ascii NOT NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB;
# This workload generates 4 binlog files, ~5MB each
--let $number_of_binlog_files = 4
--let $number_of_transactions_within_binlog_file = 64
--let $number_of_statements_within_transaction = 512
--echo *** Filling the table with a large number of records, periodically flushing binary logs.
--disable_query_log
--let $binlog_idx = 0
while ($binlog_idx < $number_of_binlog_files)
{
--let $transaction_idx = 0
while ($transaction_idx < $number_of_transactions_within_binlog_file)
{
START TRANSACTION;
--let $statement_idx = 0
while ($statement_idx < $number_of_statements_within_transaction)
{
eval INSERT INTO t1(val) VALUES(SHA2(LAST_INSERT_ID(), 256));
--inc $statement_idx
}
COMMIT;
--inc $transaction_idx
}
FLUSH BINARY LOGS;
--inc $binlog_idx
}
--enable_query_log
--echo *** Dropping the table.
DROP TABLE t1;
# identifying backend storage type ('file' or 's3')
--source ../include/identify_storage_backend.inc
# identifying interval checkpointing mode from the conbination
--let $extracted_init_connect_variable_name = binsrv_checkpointing
--source ../include/extract_init_connect_variable_value.inc
# creating data directory, configuration file, etc.
--let $binsrv_connect_timeout = 20
--let $binsrv_read_timeout = 60
--let $binsrv_idle_time = 10
--let $binsrv_verify_checksum = TRUE
# Enabling checkointing at about 40% of expected single binlog file size, so that it
# will happen twice before rotation.
# Like wise, from the time point of view, make interval pretty low so that
# at lease a few interval checkpointing events will happen.
if ($extracted_init_connect_variable_value == 'size')
{
--let $binsrv_checkpoint_size = 2M
}
if ($extracted_init_connect_variable_value == 'interval')
{
--let $binsrv_checkpoint_interval = 5s
}
if ($extracted_init_connect_variable_value == 'both')
{
--let $binsrv_checkpoint_size = 2M
--let $binsrv_checkpoint_interval = 5s
}
--source ../include/set_up_binsrv_environment.inc
--echo
--echo *** Executing the Binlog Server utility to download all binlog data
--exec $BINSRV fetch $binsrv_config_file_path > /dev/null
# cleaning up
--source ../include/tear_down_binsrv_environment.inc