문제 상황

Docker 환경에서 slave가 master DB의 binlog를 따라가지 못하고 복제 실패

Coordinator stopped because there were error(s) in the worker(s).  
The most recent failure being:  
Worker 1 failed executing transaction 'fc3ed42a-...:155027'  
at source log mysql-bin.000028, end_log_pos 588.

가설

중간에 replica 연결이 해제 되어 master 접근 실패로 인해 binlog 차이 발생

접근

  1. master, slave binlog 다른 점 확인

image.png

image.png

  1. slave replica 상태 확인 후 정확한 문제 파악
Got fatal error 1236 from source when reading data from binary log: 'Cannot replicate because the source purged required binary logs. Replicate the missing transactions from elsewhere, or provision a new replica from backup. Consider increasing the source's binary log expiration period. The GTID set sent by the replica is 'b027b6d4-1798-11f0-a33d-0242ac120004:1-6', and the missing transactions are 'fc3ed42a-f751-11ef-a735-0242ac120002:1-120542''

→ GTID Set mismatch

해결 방법

  1. master GTID Set 확인

image.png