Skip to content

Commit

Permalink
raft: skip mts_recovery_groups during start slave
Browse files Browse the repository at this point in the history
Summary:
During MySQL8+Raft DMP, some instance fail to switch to Leader or start slave

```
2021-06-24T17:56:38.627423-07:00 431 [Note] [MY-010574] [Repl] Slave: MTS group recovery relay log info group_master_log_name /data/mysql/3127/bls-unittestdb658.frc2-3305-mysql.replicaset.180021/binary-logs-3727.000033, event_master_log_pos 1129.
2021-06-24T17:56:38.627473-07:00 431 [ERROR] [MY-010575] [Repl] Error looking for file after /binlogs/binary-logs-3307.000120.
2021-06-24T17:56:38.627516-07:00 431 [ERROR] [MY-000000] [Repl] load_mi_and_rli_from_repositories: rli_init_info returned error
```

similar to 5.6, we don't need to run mts_recovery_groups due to GTID_MODE is always enabled.

Reviewed By: Pushapgl

Differential Revision: D29520066

fbshipit-source-id: d3b9fe21d84
  • Loading branch information
luqun authored and facebook-github-bot committed Jul 9, 2021
1 parent bcd67a2 commit bf8b761
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/rpl_slave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6596,6 +6596,10 @@ bool mts_recovery_groups(Relay_log_info *rli) {
return false;
}

// raft replication always have GTID_MODE=ON, thus ignore positions
if (enable_raft_plugin) {
return false;
}
/*
Save relay log position to compare with worker's position.
*/
Expand Down

0 comments on commit bf8b761

Please sign in to comment.