Skip to content

CONCEPT Cited by 1 source

Last Stable Offset (LSO)

Definition

The Last Stable Offset is the highest offset in a Kafka partition at which all prior transactions have been resolved (either committed or aborted). Consumers with isolation.level=read_committed cannot read past the LSO — any data at or above the LSO might belong to an in-progress transaction and is invisible until a COMMIT or ABORT control batch resolves it.

Failure mode: stuck LSO

If a COMMIT marker is lost (e.g., compacted away before a replica replicates it), a broker that becomes leader will pin its LSO at the offset of the unresolved transaction. All read_committed consumers see nothing past that point — the partition is effectively frozen for committed-read consumers, even as new data continues to be written above the LSO.

"Broker 2 still has the transactional data but does not know the transaction was finished. It treats the data as uncommitted and pins its Last Stable Offset (LSO) at that offset. When Broker 2 becomes leader, read_committed consumers see nothing past that point." (Source: sources/2026-06-25-redpanda-kafkas-log-compaction-corrupts-data)

The pin lasts until producer.id.expiration.ms elapses from the last record of that producer — default 24 hours, and effectively indefinite if the same producer keeps writing new transactions.

Seen in

Last updated · 559 distilled / 1,651 read