refactor(mem-wal): finish the SSTable/frozen naming pass - #8836
Open
hamersaw wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #7943 and #7957, which renamed the persisted unit to SSTable and the compaction progress to
compacted_sstablesbut 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
seal→freeze. This is the substantive one. The state was alreadyfrozenin 267 places (MemTable::freeze,is_frozen,frozen_at_wal_entry_position,frozen_memtable_grace,frozen_count,FrozenMemTable), but the action wasseal. That left one memtable lifecycle described by two verbs, and it collided withShardStatus::Sealed, which is the unrelated drop-table 2PC marker — so "sealed" meant two different things depending on what it was attached to.ShardWriter::force_seal_activeShardWriter::force_freeze_activeSealFenceFreezeFenceSealFence::sealed_generationFreezeFence::frozen_generationShardStatus::Sealedand theSEALEDproto enum are unchanged. Sealing is now exclusively a shard-lifecycle term, freezing exclusively a memtable one.Also fixes two
region_idlocals inwal.rstests, left over from the region → shard rename in #6367.Deliberately not renamed
bucket_sharding/num_buckets— the sharding transform, not a shard.mem_wal_kv_point_lookup.rs— that is RocksDB's L0 in the comparison benchmark, where the term is correct.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 --benchescargo clippy -p lance --tests --benches— no new warningscargo test -p lance --lib mem_wal— 669 passed, 0 failedcargo fmt --all🤖 Generated with Claude Code
https://claude.ai/code/session_01HgVf5C2yRbwK6pe1aMYkmg