Tag: design-database
All the articles with the tag "design-database".
-
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.
-
System Design - How TiDB Prepared Plan Cache Reuses Plans Safely
A source walkthrough of TiDB's prepared plan cache: PlanCacheStmt, LRUPlanCache, PlanCacheValue, environment keys, parameter-type matching, range rebuilding, and the configurations that control reuse.
-
System Design - How TiKV Scheduler Latches Protect TiDB Writes
Follow two competing TiDB storage commands through five TiKV latch types: sorted key hashes, per-command ownership, bucket queues, wakeup retries, completion, and the configuration knobs that do not remove hot-key contention.
-
System Design - How PostgreSQL HOT Updates Work
Why PostgreSQL can sometimes update a row without adding new index entries: heap pages, HOT chains, snapshot visibility, pruning, fillfactor, and the source-code checks that make the optimization safe.
-
System Design - How TiDB TTL Workers Delete Expired Rows
Follow an expired row through five TiDB TTL worker types: key-range scanning, the delete-task channel, guarded DELETE transactions, retry handling, and the settings that control their impact on TiKV.
-
System Design - How the Transactional Outbox Works
Why saving a database row and publishing an event can fail, and how a transactional outbox connects PostgreSQL, Debezium, Kafka, and an idempotent consumer without pretending delivery happens exactly once.