You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a flag to delay auto binlog rotation when a raft purge is active
Summary:
Purging logs in raft is very expensive because we read logs to
find the last opid for every to-be-purged binlog. Ideally we should be
storing this info in the index file like the prev gtid set but that is a
big work item. Purge can cause stalls in the commit pipeline when auto
rotation is triggered (current binlog goes beyond max_binlog_size). To
quick fix added an atomic to indicate if a raft purge is active, if yes,
we delay to auto rotate operation in group commit, avoiding stalls at
the cost of slighly exceeding max_binlog_size.
Reviewed By: anirbanr-fb
Differential Revision: D40743288
fbshipit-source-id: f51a654
---------------------------------------------------------------------
Fix purge log duration logging
Summary: Incorrect type %f was used in the format string
Reviewed By: li-chi
Differential Revision: D42725127
fbshipit-source-id: abd2ecc
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4
+
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5
+
Warnings:
6
+
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7
+
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
8
+
[connection master]
9
+
include/rpl_connect.inc [creating server_4]
10
+
include/rpl_connect.inc [creating server_5]
11
+
show status like 'rpl_raft_role';
12
+
Variable_name Value
13
+
Rpl_raft_role LEADER
14
+
show status like 'rpl_raft_role';
15
+
Variable_name Value
16
+
Rpl_raft_role FOLLOWER
17
+
reset master;
18
+
show status like 'rpl_raft_role';
19
+
Variable_name Value
20
+
Rpl_raft_role FOLLOWER
21
+
reset master;
22
+
FLUSH BINARY LOGS;
23
+
FLUSH BINARY LOGS;
24
+
FLUSH BINARY LOGS;
25
+
FLUSH BINARY LOGS;
26
+
SELECT SLEEP(1);
27
+
SLEEP(1)
28
+
0
29
+
SET @@GLOBAL.max_binlog_size = 4096;
30
+
CREATE TABLE t1(a INT PRIMARY KEY, b TEXT);
31
+
SET debug_sync='raft_purge_flag_set SIGNAL purge_reached WAIT_FOR purge_continue';
32
+
PURGE RAFT LOGS BEFORE NOW();
33
+
SET debug_sync='now WAIT_FOR purge_reached';
34
+
INSERT INTO t1 VALUES(1, REPEAT('a', 5000));
35
+
SET debug_sync='now SIGNAL purge_continue';
36
+
Warnings:
37
+
Warning 1868 file ./binary-logs-13000.000006 was not purged because it is the active log file.
0 commit comments