Skip to content

refactor(mem-wal): finish the SSTable/frozen naming pass - #8836

Open
hamersaw wants to merge 1 commit into
lance-format:mainfrom
hamersaw:refactor/mem-wal-naming
Open

refactor(mem-wal): finish the SSTable/frozen naming pass#8836
hamersaw wants to merge 1 commit into
lance-format:mainfrom
hamersaw:refactor/mem-wal-naming

Conversation

@hamersaw

Copy link
Copy Markdown
Contributor

What

Follow-up to #7943 and #7957, which renamed the persisted unit to SSTable and the compaction progress to compacted_sstables but left two terms behind in the internals.

L0 → SSTable. 26 doc-comment and test-name references survived the earlier passes. The format spec has no L0 concept — a flushed MemTable is an SSTable, and SSTables are compacted into the base table — so the term only lived in prose.

Memtable sealfreeze. This is the substantive one. The state was already frozen in 267 places (MemTable::freeze, is_frozen, frozen_at_wal_entry_position, frozen_memtable_grace, frozen_count, FrozenMemTable), but the action was seal. That left one memtable lifecycle described by two verbs, and it collided with ShardStatus::Sealed, which is the unrelated drop-table 2PC marker — so "sealed" meant two different things depending on what it was attached to.

Before After
ShardWriter::force_seal_active ShardWriter::force_freeze_active
SealFence FreezeFence
SealFence::sealed_generation FreezeFence::frozen_generation

ShardStatus::Sealed and the SEALED proto enum are unchanged. Sealing is now exclusively a shard-lifecycle term, freezing exclusively a memtable one.

Also fixes two region_id locals in wal.rs tests, left over from the region → shard rename in #6367.

Deliberately not renamed

  • bucket_sharding / num_buckets — the sharding transform, not a shard.
  • "L0 SSTs" in mem_wal_kv_point_lookup.rs — that is RocksDB's L0 in the comparison benchmark, where the term is correct.
  • Prometheus histogram buckets, and the Harley-Seal popcount in hamming.rs.

Compatibility

MemWAL is experimental. The renamed API is Rust-only — no Python, Java, or protobuf surface — and there is no on-disk or wire change. Renamed directly without deprecation shims, matching the precedent set in #7943.

Validation

  • cargo check -p lance --tests --benches
  • cargo clippy -p lance --tests --benches — no new warnings
  • cargo test -p lance --lib mem_wal — 669 passed, 0 failed
  • cargo fmt --all

🤖 Generated with Claude Code

https://claude.ai/code/session_01HgVf5C2yRbwK6pe1aMYkmg

Follow-up to lance-format#7943 and lance-format#7957, which renamed the persisted unit to SSTable
and the compaction progress to `compacted_sstables` but left two terms
behind in the internals.

**`L0` -> SSTable.** 26 doc-comment and test-name references survived the
earlier passes. The format spec has no L0 concept — a flushed MemTable is
an SSTable, and SSTables are compacted into the base table — so the term
only appeared in prose.

**Memtable `seal` -> `freeze`.** The state was already `frozen` in 267
places (`MemTable::freeze`, `is_frozen`, `frozen_memtable_grace`,
`frozen_count`, `FrozenMemTable`), but the action was `seal`. That left
one memtable lifecycle described by two verbs, and collided with
`ShardStatus::Sealed`, which is the unrelated drop-table 2PC marker.
Renamed: `force_seal_active` -> `force_freeze_active`, `SealFence` ->
`FreezeFence`, `SealFence::sealed_generation` ->
`FreezeFence::frozen_generation`.

`ShardStatus::Sealed` and the `SEALED` proto enum are unchanged — sealing
is now exclusively a shard-lifecycle term.

Also fixes two `region_id` locals in `wal.rs` tests, left over from the
region -> shard rename in lance-format#6367.

## Not renamed

- `bucket_sharding` / `num_buckets`: the sharding transform, not a shard.
- `mem_wal_kv_point_lookup.rs` "L0 SSTs": that is RocksDB's L0 in the
  comparison benchmark, where the term is correct.
- Histogram buckets, and the Harley-Seal popcount in `hamming.rs`.

## Compatibility

MemWAL is experimental. The renamed API is Rust-only — no Python, Java, or
protobuf surface — and there is no on-disk or wire change. Renamed directly
without deprecation shims, matching lance-format#7943.

## Validation

- `cargo check -p lance --tests --benches`
- `cargo clippy -p lance --tests --benches` (no new warnings)
- `cargo test -p lance --lib mem_wal` — 669 passed
- `cargo fmt --all`

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HgVf5C2yRbwK6pe1aMYkmg
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The rename matches the existing frozen MemTable state, keeps sealed specific to shard drop-table 2PC, and preserves runtime, storage, and wire behavior.

Please mark this PR with the breaking-change label.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant