Tag: design-tidb
All the articles with the tag "design-tidb".
-
System Design - How TiDB's Selection Executor Filters Chunks
Trace a root Selection from PhysicalSelection through executorBuilder and SelectionExec to a vectorized filter, including its row-at-a-time fallback and chunk controls.
-
System Design - How TiDB's LIMIT Executor Reads Only Enough Rows
Trace LIMIT with OFFSET through TiDB's PhysicalLimit, executorBuilder, LimitExec, and Chunk, including how chunk demand and session settings affect reads.
-
System Design - How TiDB Writes and Reads Its Slow Query Log
A source-level tour of TiDB's slow SQL path: ExecStmt's duration gate, SlowQueryLogItems formatting, the file logger, and the SLOW_QUERY virtual table.
-
System Design - How TiDB Tracks Query Memory in Source Code
Follow TiDB's memory trackers from StatementContext to the session quota and OOM action, with a focused walkthrough of the current source code and its key settings.
-
System Design - How TiDB Async Commit Works in Source Code
A focused source walkthrough of TiDB Async Commit: how a SQL COMMIT reaches tikv/client-go, how TiKV stores async-commit lock metadata and a minimum commit timestamp, and why TiDB can acknowledge before background lock finalization.
-
System Design - How TiDB GC Safe Points Protect MVCC Reads
A source-code walkthrough of TiDB's MVCC garbage collection: how GCWorker advances a safe point and how TiKV turns it into region cleanup.