How does TiFlash ensure data consistency when making intelligent selections due to asynchronous replication?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 由于TiFlash的异步复制,TiFlash在做智能选择时如何保证数据的一致性?

| username: alfred

【TiDB Usage Environment】Production\Testing Environment\POC
【TiDB Version】
【Encountered Issues】
【Reproduction Path】What operations were performed that led to the issue
【Issue Phenomenon and Impact】
【TiDB Operator Version】:
【K8s Version】:
【Attachments】:

Due to TiFlash’s asynchronous replication, how does TiFlash ensure data consistency when making intelligent choices? (If some parts read the latest data from TiKV while other parts read from TiFlash, which may not necessarily have the latest data)

| username: Raymond | Original post link

Reading from TiFlash can actually retrieve strongly consistent data. The general implementation method is that each time a read request is received, the Region replica in TiFlash will initiate a progress check with the Leader replica (a very lightweight RPC request). It will only respond to the read request when the progress ensures that the data covered by the read request timestamp is included.

Consistency of reads is ensured through the read index method, which is covered in the advanced system management course on the official website.

| username: alfred | Original post link

Are you referring to data at the SI isolation level?

| username: forever | Original post link

It will check the version number.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.