Skip to content

Atlas cold tier: shard compaction for partial retirement — #6042 follow-on 5 #8231

Done

Description

@dezren39

Follow-on 5 of 5 from the #6042 cold-tier shard format design (doc/2026-11-10T20-06-24Z_design_atlas_cold_tier_shard_format/, merged in PR #8225). Parent: #6026.

Implement shard compaction per §8 of the design doc, driven by the #6041 retention engine's retirement output: retiring some of a shard's versions produces a successor shard (re-pack of the survivors under the §4 rules, new shard_id, cold catalog updated); a shard is deleted whole only when every version it holds is retired; shards are never edited in place. Retirement tombstones stay in hot metadata per #6026 §4.4.

Acceptance: after a partial retirement, surviving versions still restore byte-identically (cold-roundtrip-verify, follow-on 4) from the successor shard, and the retired versions resolve to their hot tombstone records.

Activity

  1. added
    area/infra
    on Nov 10, 2026
  2. developing-today commented on Nov 10, 2026

    @developing-today
    Contributor
  3. added
    epic/atlas-program
    on Nov 12, 2026
  4. added this to the Atlas program milestone on Nov 12, 2026
  5. added
    task/small-fix
    priority/normal
    effort/m
    status/triaged
    on Nov 17, 2026
  6. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Triage evidence (fresh, 2026-11-17)

  7. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — lane any-y, task 20099

  8. added
    queue/blocked
    status/blocked
    on Nov 17, 2026
  9. removed their assignment
    on Nov 20, 2026
  10. 7 remaining items

  11. added
    kind/feature
    on Nov 29, 2026
  12. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix):

  13. added
    source/queue-worker
    on Nov 29, 2026
  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: none material.

    Strengths: linked to its epic/programme via epic/* labels; explicit Acceptance: statement in the body (in-substance equivalent).

    Blocker: status/blocked + queue/blocked carried; the tool gates on follow-on 4 (#8230, cold-roundtrip-verify) per the body's acceptance statement.

    Actions taken: labels added this pass: source/queue-worker

    Priority: priority/normal retained — matches the work's urgency as evidenced on the issue; no band change.

  15. removed
    status/blocked
    queue/blocked
    on Nov 30, 2026
  16. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    P0.5 silently-unblocked clearance (Felix lane 0640-PB, 2026-11-30, Refs #17071). Live re-verification: all three native blockers are CLOSED (#8227, #8229, #8230 — they closed after the Nov-24 blocked notes on this issue); no open native blockers, no active external holds. Removed the three stale closed blockedBy edges and the stale status/blocked + queue/blocked labels (status/triaged retained). After (verified by re-read): blockedBy empty, no blocked labels. This issue is unblocked.

  17. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Claim — Archer lane 0407-R (charlie ADVANCE programmes 2nd wave, atlas/id, 2026-11-30).

    Taking #8231 (Atlas cold tier: shard compaction for partial retirement, #6042 follow-on 5). Live claim-scan this lane: transport verified firsthand (two consecutive gh api rate_limit rc=0); issue + all comments read; Felix lane 0640-PB cleared the stale blockers today 2026-11-30T09:21Z (all native blockedBy CLOSED: #8227/#8229/#8230) and no claim followed. Scope: implement shard compaction per design §8 (doc/2026-11-10T20-06-24Z_design_atlas_cold_tier_shard_format) in pkgs/atlas-search/crates/atlas-core — partial retirement produces a successor shard re-packed from survivors under §4 rules with a new shard_id and cold-catalog update; whole-shard delete only when every version is retired; shards never edited in place. Acceptance: surviving versions restore byte-identically via cold-roundtrip-verify from the successor shard; retired versions resolve to hot tombstone records. Verification via fleet Actions exec / repo CI on the pushed branch; CI is not a merge gate — merge on my own read of the diff + test evidence.

    Key: 0407-R

  18. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    Resolution — Lane 0407-R (charlie ADVANCE, 2026-11-30)

    Implemented and merged: PR #17160 — #17160 (merge commit 4569938b0ffd9ffef9cc5493bcd27a456dd3c9ff).

    compact_shard in pkgs/atlas-search/crates/atlas-core/src/cold_shard.rs, per design §8:

    • Partial retirement → successor shard: survivors re-packed under §4 via the existing pack writer with a caller-minted shard_id; source verified (footer/section checksums via unpack) and read, never edited in place.
    • Whole-shard retirement → CompactionOutcome::WholeShardRetired (no successor): caller deletes the object + 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 — that confirmation is the catalog writer's step, fed by this outcome.
    • Only spans still referenced by survivors are carried over, and only their vectors; a span shared with a survivor is retained.
    • Retention carries over: cold_since / retire_not_before unchanged (compaction never extends a version's path to retirement); the successor's retention trigger wraps the pack trigger with the compaction record.
    • A retired version the shard does not hold, or an empty retirement set, is a Packing error — never a silent no-op.

    Verification: fleet-command run 46403188011 on branch head b2dffe78 concluded SUCCESS — cargo test -p atlas-core cold_shard, including four new tests whose oracle is §8 + this issue's acceptance (partial-retirement successor round-trips byte-identically per survivor content hash; retired-only span/vector dropped; whole-shard case; unknown/empty rejection; zstd successor round-trip). Merged on my own read of the full diff against the issue + that evidence (CI is not a gate).

    Closing as implemented. Key: 0407-R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/infraeffort/mepic/atlas-programkind/featurepriority/normalsource/queue-workerstatus/triagedtask/small-fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions