← Concepts

阅读中文版本

Delta Lake Transactions

Delta Lake adds an ACID transaction log on top of Parquet data files, so that concurrent writers and readers see a consistent snapshot without the file-listing race conditions of plain object storage.

database

Definition

Delta Lake is a storage format that maintains a transaction log of atomic commits on top of immutable Parquet data files, providing ACID transactions, time travel, schema enforcement, and upserts on object storage where rename and list are not atomic and concurrent writers otherwise corrupt the table.

Context and scope

Applied in lakehouse architectures, streaming ingestion into object storage, and any data lake where concurrent writes and read consistency are required.

Common misconceptions

  • Delta Lake makes object storage a database — it adds a transaction log; it does not add indexes, constraints, or the full RDBMS cost model
  • The transaction log makes writes serial — it makes the commit serial; the write itself is concurrent and the commit is the serialization point

Anti-patterns

  • Running many concurrent writers without partitioning the table, so every writer contends on the log commit
  • Treating Delta as fully ACID without noting that isolation is snapshot-based and write-write conflicts on the same file are still possible

Related concepts

Authoritative source

https://docs.delta.io/latest/delta-intro.html

What it is

Delta Lake is a storage format that maintains a transaction log of atomic commits on top of immutable Parquet data files, providing ACID transactions, time travel, schema enforcement, and upserts on object storage where rename and list are not atomic and concurrent writers otherwise corrupt the table. Applied in lakehouse architectures, streaming ingestion into object storage, and any data lake where concurrent writes and read consistency are required. The data model and the access patterns are co-designed: a schema that is correct in the relational sense can be catastrophic for the queries the workload actually issues.

How it works

Indexing decisions follow the query shapes, not the column importance: a covering index turns a table scan into an index-only scan, but every index adds write amplification and storage cost. Partitioning aligns with the access dimension so a query touches one partition, not all. Transaction scope is minimized to hold locks briefly; long transactions are the root of contention and deadlock.

When to apply and pitfalls

Apply when data volume or query latency has a concrete business cost. The common pitfall is indexing for the current workload and ignoring the access patterns that growth will introduce — the index that helps today can serialize writes tomorrow. Another is treating the database as a black box, missing that the optimizer’s plan choice depends on statistics that drift as data changes.