Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiKV的load based split拆分region对应代码逻辑应该在哪?
I read the blog on TiKV Split source code analysis, but I didn’t find the code logic for splitting based on load. Load Based Split is said to be a feature added after version 4.0. Is the splitting done on PD?
There are three methods to trigger region split in TiDB:
- TiDB trigger: Manually triggered through DDL SQL, split table xxx;
- PD trigger: Triggered through PD API /regions/split or by creating an Operator with pd-ctl;
- TiKV trigger: Includes two types, one is raft-driven split check, commonly triggered when the size exceeds the threshold, and the other is load split.
Core code reference:
tikv/components/raftstore/src/store/worker/split_controller.rs at b0f67e6128e4596367dba7b0400065b2496c65a3 · tikv/tikv · GitHub
This topic was automatically closed 1 minute after the last reply. No new replies are allowed.