Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 请问设置列存后还会同步吗
After setting the column store for a table with data using ALTER TABLE XXXXX SET TIFLASH REPLICA 1, if you insert some data into this table, will the newly inserted data be immediately synchronized to the column store? Is this process asynchronous or synchronous?
It will synchronize, but it is asynchronous. It is generally very fast, but production will not cause the original SQL execution to fail due to synchronization exceptions.
May I ask where you saw the asynchronous part? Is there any documentation?
TiFlash is a key component of the TiDB HTAP architecture. It is a columnar storage extension of TiKV, providing good isolation while also ensuring strong consistency. Columnar replicas are asynchronously replicated through the Raft Learner protocol, but during reads, they achieve Snapshot Isolation consistency level by using Raft to verify indexes in conjunction with MVCC. This architecture effectively addresses the isolation and columnar synchronization issues in HTAP scenarios.
Asynchronous, TiDB has three types for each region: leader, follower, and learner. TiFlash is a learner, it only synchronizes data and does not participate in leader election.
Similarities and differences
TiFlash is asynchronous and not real-time.
Asynchronous synchronization, the results still need to be stored and verified using TiKV.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.