Repository navigation
feat(atlas-core): cold shard compaction — successor re-pack on partial retirement (#8231) - #17160
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Implements #8231 (Atlas cold tier, #6042 follow-on 5): shard compaction per design §8 of
doc/2026-11-10T20-06-24Z_design_atlas_cold_tier_shard_format/.What
Adds
compact_shardtopkgs/atlas-search/crates/atlas-core/src/cold_shard.rs, driven by the #6041 retention engine's retirement output for one shard:packwriter with a newshard_id; the source object is verified and read, never edited in place.CompactionOutcome::WholeShardRetired): the caller deletes the object and its cold-catalog row; retired versions are named in the outcome so their hot tombstones (design(atlas): content versioning + retention — versions, rename lineage, newest-resolution, cold rollout, deletion triggers #6026 §4.4) can be confirmed.cold_since,retire_not_beforeunchanged — compaction must not extend a version's path to retirement); the successor's retention trigger wraps the pack trigger with the compaction record (source shard, run id, retired set).Packingerror — never a silent no-op.Tests (oracle: design §8 + the #8231 acceptance)
Four new tests in the writer's suite, all on the shared §7 sample corpus:
compaction_partial_retirement_successor_roundtrips— retire (7,1); successor holds exactly the survivors, every survivor reconstructs byte-identically and matches its content hash, the retired-only span and its vector are dropped, the shared span is retained, retention fields unchanged.compaction_whole_shard_retired_has_no_successor.compaction_rejects_unknown_and_empty_retirement.compaction_zstd_successor_roundtrips— same acceptance under the zstd span codec.Verification: cargo test for atlas-core on this branch via the remote route (run id recorded on #8231); merge on the lane's own read of the diff + that evidence (CI is not a gate).
Lane: 0407-R (charlie ADVANCE 2026-11-30, programmes atlas/id).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.