# [Known-Issues]-关于-TiFlash-不同步数据,日志报错-can-not-get-tiflash-replica-info-from-tidb

## Key Words

TiFlash, can not get tiflash replica info from tidb

## Description

TiFlash 不同步数据，查看日志报错 can not get tiflash replica info from tidb

## Root Cause

TiDB 内部获取 replica 信息时，需要根据 tikv_gc_safe_point 获取 DDL JOB 信息，由于 gcworker 的一个 bug，在 global autocommit = 0 时，写入该变量的事务没有提交，导致 tikv_gc_safe_point 信息滞后. 引入这个 bug 的改动是 [https://github.com/pingcap/tidb/pull/14403](https://github.com/pingcap/tidb/pull/14403)

## Diagnostic Steps

1. 从 tiflash_manager 日志看到类似如下报错

    [2021/05/20 14:54:48.741 +08:00] \[ERROR] \[root] \[can not get tiflash replica info from tidb: \[(‘172.26.55.91:10080’, Exception(‘unexpected status code 400 from [http://172.26.55.91:10080/tiflash/replica](http://172.26.55.91:10080/tiflash/replica)’,)), (‘172.26.55.92:10080’, Exception(‘unexpected status code 400 from [http://172.26.55.92:10080/tiflash/replica](http://172.26.55.92:10080/tiflash/replica)’,)), (‘172.26.55.93:10080’, Exception(‘unexpected status code 400 from [http://172.26.55.93:10080/tiflash/replica](http://172.26.55.93:10080/tiflash/replica)’,))]

2. 使用 `curl [http://172.26.55.93:10080/tiflash/replica` 之后，返回 GC 相关报错

    [tikv:9006]GC life time is shorter than transaction duration, transaction starts at 2021-05-19 14:25:16.451 +0800 CST, GC safe point is 2021-05-20 10:05:49.247 +0800 CST |

3. 查看参数 `autocommit =0`

## Resolution

设置 autocommit = 1 后 TiFlash 可以正常同步.  **set global autocommit=1;**  修复 PR：[https://github.com/pingcap/tidb/pull/24975](https://github.com/pingcap/tidb/pull/24975)

## Workaround

N/A

## Affected Version

<4.0.13

<5.0.1
