pingcap/tidb
Glossary
Project-specific terms and acronyms that appear throughout this codebase. For external concepts (Raft, MVCC, snapshot isolation) refer to the upstream TiDB documentation; this glossary is scoped to vocabulary that the source code itself uses.
| Term | Meaning |
|---|---|
| AST | Abstract syntax tree produced by the parser; types live in pkg/parser/ast/. |
| BR | Backup & Restore — the CLI tool and library under br/. |
| Bazel prepare | The make bazel_prepare step that regenerates BUILD.bazel/*.bzl files. Required after Go-source structural changes. See AGENTS.md -> Build Flow. |
| Cascades | The newer Cascades-style optimizer being developed under pkg/planner/cascades/. The current default optimizer lives in pkg/planner/core/. |
| Chunk | The columnar in-memory batch format used in execution; defined in pkg/util/chunk/. |
| Coprocessor | TiKV/TiFlash request type that pushes filters/projections/aggregations down to the storage node. Driven by pkg/store/copr/ and pkg/distsql/. |
| DDL job | A unit of work for schema change. Submitted by pkg/ddl/job_submitter.go, scheduled by pkg/ddl/job_scheduler.go, executed by pkg/ddl/job_worker.go. |
| DistSQL | Distributed SQL request layer that builds and dispatches coprocessor requests. Lives in pkg/distsql/. |
| Domain | The per-TiDB-instance object that owns the schema/infoschema cache, the statistics handle, the bind manager, the slow-query top-N, the runaway controller, and most background workers. Defined in pkg/domain/domain.go. |
| DXF | Distributed eXecution Framework. Cluster-wide task framework used for distributed ADD INDEX, IMPORT INTO, and statistics jobs. Lives in pkg/dxf/. |
| Failpoint | The pingcap/failpoint library used for fault injection in tests. Some packages require make bazel-failpoint-enable (or the failpoint-go-test.sh helper) before running tests. |
| HTAP | Hybrid Transactional/Analytical Processing. TiKV (row store) + TiFlash (columnar replica) serve OLTP and OLAP from the same data. |
| Infoschema | The in-memory schema snapshot used for query compilation. pkg/infoschema/. Each Domain reload swaps the live infoschema. |
| Keyspace | Logical multi-tenancy boundary in TiKV. Code lives in pkg/keyspace/ and is referenced via kerneltype in cmd/tidb-server/main.go. |
| KV | Key-value abstraction over the storage layer. Interfaces in pkg/kv/; TiKV implementation under pkg/store/. |
| Lightning | TiDB Lightning, the high-throughput data importer. Runtime in lightning/, libraries in pkg/lightning/. |
| Logical plan / Physical plan | Output of the planner. Logical operators live in pkg/planner/core/operator/logicalop/; physical operators in pkg/planner/core/operator/physicalop/. |
| MPP | Massively Parallel Processing query execution against TiFlash. Coordinated by pkg/executor/mpp_gather.go and pkg/executor/mppcoordmanager/, dispatched via pkg/store/copr/mpp.go. |
| PD | Placement Driver — cluster metadata, region scheduling, and timestamp oracle service. External component; TiDB connects via the tikv/client-go client. |
| Plan cache | LRU cache of compiled prepared-statement plans. Files: pkg/planner/core/plan_cache*.go. |
| Region | Range of keys served by a TiKV Raft group. TiDB caches region routing in pkg/store/copr/region_cache.go. |
| Region cache | Client-side cache of region-to-peer routing fetched from PD. |
| Resource group | SQL-level resource control (RU). Code under pkg/resourcegroup/ and pkg/resourcemanager/. |
| RU | Request Unit — abstract resource unit used by resource groups. |
| SCS / standby | Single Cluster Service / standby logic in pkg/standby/ for warm-up and graceful failover. |
| SQL digest | Normalized hash of a SQL statement; produced by pkg/parser/digester.go. Used for stmt summary, plan capture, and slow log correlation. |
| Statement summary | In-memory aggregated SQL statistics; persisted to system tables. Lives in pkg/util/stmtsummary/. |
| TiDB-server | The SQL frontend daemon built from cmd/tidb-server/main.go. The "TiDB" in this repo nearly always means the SQL server, not the cluster. |
| TiFlash | Columnar storage replica, used for HTAP. Separate process; TiDB talks to it via MPP/coprocessor RPCs. |
| TiKV | Distributed transactional KV store. Separate process; TiDB connects via tikv/client-go/v2. |
| TopN | A statistics structure tracking the most frequent values per column/index. Built in pkg/statistics/cmsketch.go/fmsketch.go. |
| TSO | Timestamp Oracle. PD-issued monotonic timestamps used as transaction commit/start TS. |
| TTL | Time-to-live job framework that deletes expired rows. pkg/ttl/. |
| Unistore | In-process mock TiKV used by tests and the --store=unistore mode. pkg/store/mockstore/unistore/. |
| Upgrade | Bootstrap-time schema/version migration logic. Defined in pkg/session/upgrade_def.go and driven by pkg/session/upgrade_run.go. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.