Tag: design-tidb
All the articles with the tag "design-tidb".
-
System Design - How TiDB AUTO_RANDOM IDs Work in Source Code
A small TiDB source walkthrough of AUTO_RANDOM: how an insert combines a shard prefix with an allocated counter, and how that changes clustered row keys.
-
System Design - How TiDB Index Merge Combines Index Scans
Trace TiDB's union-type Index Merge from a physical plan through parallel index scans, duplicate-handle removal, and a table lookup.
-
System Design - How TiDB Dynamically Prunes Table Partitions
A source-code walkthrough of TiDB dynamic partition pruning: how a plan carries predicates to execution, selects physical partitions, and builds scans for them.
-
System Design - How TiDB Transactionally Backfills an Index
Trace TiDB's transactional ADD INDEX worker from schema-state changes through row decoding, uniqueness checks, and batched KV writes.
-
System Design - How TiDB AUTO_INCREMENT Cache Works in Source Code
A focused TiDB source walkthrough of AUTO_ID_CACHE=1: how table metadata selects the allocator service, how it reserves ID ranges, and why failover can leave gaps.
-
System Design - How TiDB Cancels a Query with KILL QUERY
Trace TiDB's KILL QUERY path from SQL execution through global connection routing, session cancellation, and the SQLKiller signal.