You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Enhancement] Record generation version on lake PK index sstables
Reuse PersistentIndexSstablePB.version (field 1, previously deprecated and
unused) to record, for each physical PK-index sstable, the tablet metadata
version at which it first became visible. Segment (rowset.version), delvec,
and DCG already carry a reliable version; PK-index sstables did not. This is
open-source infrastructure so that a version-based incremental copy has a
reliable per-file version for PK sstables.
- LakePersistentIndex::commit stamps each sstable via assign_new_versions:
a file already present in the previous persisted sstable_meta keeps its
recorded version -- so a legacy/pre-feature file (never stamped) stays 0 and
lake vacuum retention treats it conservatively -- a genuinely-new file (absent
from the previous meta) gets the new version, and a non-zero value is never
overwritten. This one choke point covers normal flush, all compaction
variants, and ingest.
- The reshard PK-memtable flush runs commit() at base_version, so it threads the
reshard new_version as an explicit parameter (commit() otherwise defaults to
the builder's publish version), stamping freshly-flushed sstables with
new_version without mutating the metadata version.
- Merge builds sstable_meta directly (bypasses commit): rebuild outputs are new
physical files stamped new_version at their emit sites, while projection paths
reuse the file and inherit the version via CopyFrom.
- ingest_sst stamps the ingested sstable's version.
- proto: document field 1 and fix the stale PersistentIndexSstableMetaPB
ordering comment (ordered by max_rss_rowid).
0/unset means unknown; consumers such as lake vacuum retention must treat it
conservatively. Cross-cluster replication is out of scope.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: xiangguangyxg <xiangguangyxg@gmail.com>
0 commit comments