# [Critical bug]DM 使用 GTID 同步时可能跳过 binlog 事件

## Issue

### Bug phenomenon

1. 上下游数据不一致或同步因 duplicate entry 中断；且

2. 不一致的数据所在的 binlog 事件，其位置连续分布在 GTID 的中间到结束；且

3. DM worker 日志中有 “reset replication binlog puller” 的行，该行打印 GTID set 的下一个 GTID 包含了不一致的数据

### Message to the business team: 请检查影响版本和触发条件，无其他特别信息 

## Root Cause

Specific reason:

DM 进行细粒度重试时跳过了没有完全同步的 GTID

## Diagnostic Steps

Triggering condition:  

1. 用户在数据源配置中启用了 GTID（enable-gtid: true）；且

2. DM worker sync 单元在读取 GTID 中间的 binlog 事件时遇到了 “connection refuse” 以外的错误

Related detailed document:

[ticdc##3711](https://github.com/pingcap/ticdc/issues/3711)

## Resolution

### Fix Version

DM v5.3.1, v5.4.0

## Workaround

1. 在场景允许时使用 binlog position 同步（enable-gtid: false）；或
2. 开启 relay log