What are the subsequent operations of TiFlash after the region merge in TiKV? Is it related to WAL?

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

Original topic: tikv的region合并后,tiflash后续的操作是什么? 是否和wal有关系?

| username: TiDBer_G6MRpAB8

What are the subsequent operations of TiFlash after TiKV’s region merge? Is it related to WAL?

| username: Daniel-W | Original post link

Combining this diagram for understanding, when TiKV region1 and region2 merge, the corresponding region1 and region2 in TiFlash will also merge.

TiFlash relies on the same Multi-Raft system, replicating and distributing data at the Region level.

The Region replicas in TiFlash correspond exactly to those in TiKV and will split and merge simultaneously with the Leader replicas in TiKV.

Reference: TiFlash 简介 | PingCAP 文档中心

The storage engine for TiKV is RocksDB, while the storage engine for TiFlash is DeltaTree.

RocksDB is an open-source single-node Key-Value Map storage engine that uses LSM-tree. It first saves data to memory (mem table) and writes a WAL (write-ahead log) to disk to prevent data loss in case of power failure. Once a certain amount of data is accumulated, it is then flushed to disk.

| username: 大飞哥online | Original post link

TiKV regions are the same as TiFlash regions. The difference is that one uses row storage and the other uses column storage.

WAL (Write-Ahead Logging) is used by TiKV to write data and prevent data loss in case of a crash; it has nothing to do with TiFlash. Data in TiKV is written to the leader’s raftstore log and then synchronized to followers and learners.

| username: ajin0514 | Original post link

The difference is that one is row storage, and the other is column storage.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.