fix(mem-wal): resolve writer shard spec identity - #8112
Conversation
a82f42f to
9c6f90d
Compare
|
Important This PR touches the Lance format specification. Substantive changes to the format specification — the If this is a meaningful format change:
|
9c6f90d to
dbb9b85
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
0c3ae83 to
369c3ae
Compare
369c3ae to
ef2336f
Compare
|
Scope reset completed and force-pushed on latest The PR is now one commit / one file ( Removed: monotonic allocation, multi-revision/activation semantics, metadata-boundary validation, format docs, and all format-change claims. The original boundary regression failed with manifest spec This is complementary to, but not a prerequisite for, #7949. Please re-review the reduced current-path fix. |
ef2336f to
c79ab2b
Compare
c79ab2b to
5278607
Compare
5278607 to
5d3435a
Compare
5d3435a to
4e1861b
Compare
4e1861b to
02a0404
Compare
1b2c5b5 to
9bf9f42
Compare
|
CI note: the current failures are runner-environment flakes unrelated to this change (which touches only mem_wal/api.rs): |
|
The remaining CI failures here are tracked in #8789 — systematic main-level test failures (not caused by this PR). Will retrigger once main's own CI recovers. |
006e024 to
c831944
Compare
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The writer resolves shard identity before any claim side effect, and the success-path cases cover manual identity, automatic default resolution, and an explicit matching ID. Future spec revisions and activation semantics remain cleanly out of scope.
c831944 to
20c81df
Compare
Summary
shard_spec_id(0) to the MemWAL index's sole automatic sharding spec before creating or claiming a shard manifest0Dataset::mem_wal_writerboundary plus invalid manual, mismatched, and multiple-spec inputsScope
This PR fixes the current writer path only. MemWAL initialization already creates either no spec (manual sharding) or one automatic spec with id
1; the writer must record that same identity instead of its unresolved default0.It does not add monotonic allocation, spec revisions, activation semantics, metadata validation for hypothetical producers, or a file-format change. Those require a separate end-to-end design if a re-shard API is introduced.
This PR complements but is not a prerequisite for #7949: this PR resolves the table identity before a fresh manifest is created, while #7949 defensively rejects changing an identity already stored in a manifest.
Testing
cargo fmt --all -- --checkcargo test -p lance --lib test_writer_shard_spec_resolution_rejects_invalid_identity -- --nocapturecargo test -p lance --lib test_mem_wal_writer_uses_automatic_sharding_spec -- --nocapturecargo clippy --all --tests --benches -- -D warnings