Skip to content

refactor(storage): hygiene — AofShardManifest rename, tier-vocabulary disambiguation, #48 RFC tie-in (W6) - #401

Merged
pilotspacex-byte merged 1 commit into
mainfrom
refactor/w6-hygiene
Jul 20, 2026
Merged

refactor(storage): hygiene — AofShardManifest rename, tier-vocabulary disambiguation, #48 RFC tie-in (W6)#401
pilotspacex-byte merged 1 commit into
mainfrom
refactor/w6-hygiene

Conversation

@pilotspacex-byte

Copy link
Copy Markdown
Contributor

Summary

Sixth and final PR of the storage-unification campaign (stacked on #400#399#398#397#396). Closes out finding F6's hygiene tail.

  • aof_manifest::ShardManifestAofShardManifest. Two unrelated structs shared the name: the page manifest's (persistence::manifest — the durable spill/offload root threaded through every eviction/spill call site) and the AOF manifest's per-shard entry. Same name, different on-disk formats, different planes — ambiguous in code search and every cross-plane persistence discussion (the unified-manifest RFC lists this rename as a prerequisite). The AOF struct has zero external importers, so the rename is contained to aof_manifest/{mod,shard_rewrite}.rs; a doc note on the struct records the rationale.
  • storage::tier parked, disambiguated. ResidencyTier gained a doc note separating it from manifest::StorageTier: StorageTier is an ON-DISK FileEntry field with persisted byte values; ResidencyTier is the IN-MEMORY residency vocabulary (the K4 types-only module, kept by design for the M4 tiering milestone the vector-tiering-v2 plan adopts). They intersect in concept but not in role and must not be merged.
  • Task P1-5: ShardManifest MAX_INLINE_ENTRIES caps disk-offload at ~80 files (overflow pages) #48 tie-in recorded in the unified-manifest RFC (.planning/rfcs/unified-manifest-engine.md, planning submodule): a future manifest engine's section decoders must adopt the replication poison-record policy verbatim — fail-closed per section with an INFO counter, never skip-and-continue past an undecodable section.

No behavior change; rename + docs only.

Gates

  • ✅ macOS lib 4427 · Linux VM release-fast 4449 (monoio) + 3616 (tokio,jemalloc)
  • ✅ clippy -D warnings ×2 feature sets · fmt · CHANGELOG entry

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TinDang97, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0c126e46-e369-497f-9834-718fc3550527

📥 Commits

Reviewing files that changed from the base of the PR and between b07fa27 and 80fb09a.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • src/persistence/aof_manifest/mod.rs
  • src/persistence/aof_manifest/shard_rewrite.rs
  • src/storage/tier.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/w6-hygiene

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TinDang97
TinDang97 force-pushed the refactor/w6-hygiene branch from f1f8e90 to 5ec87fd Compare July 20, 2026 05:33
@TinDang97
TinDang97 force-pushed the refactor/w5-typed-accessors branch from cdd5f8b to 247d776 Compare July 20, 2026 05:33
@pilotspacex-byte
pilotspacex-byte changed the base branch from refactor/w5-typed-accessors to main July 20, 2026 05:34
… disambiguation, #48 RFC tie-in (W6)

Closes out the storage-unification campaign's F6 hygiene tail:

- persistence::aof_manifest::ShardManifest -> AofShardManifest. Two
  unrelated structs shared the name ShardManifest: the page manifest's
  (persistence::manifest — the durable spill/offload root every
  eviction/spill call site threads around) and the AOF manifest's
  per-shard entry. Same name, different on-disk formats, different
  planes — ambiguous in code search and in every cross-plane
  persistence discussion (the unified-manifest RFC lists this rename
  as a prerequisite). The AOF struct is private to its module tree
  (zero external importers), so the rename is contained to
  aof_manifest/{mod,shard_rewrite}.rs; a doc note on the struct
  records the collision rationale.

- storage::tier::ResidencyTier doc note: disambiguates it from
  persistence::manifest::StorageTier — StorageTier is an ON-DISK
  FileEntry field with persisted byte values; ResidencyTier is the
  IN-MEMORY residency vocabulary (K4 types-only module, parked by
  design for the M4 tiering milestone). They intersect in concept but
  not in role and must not be merged. tier.rs itself stays: it is the
  documented K4 forward-vocabulary the vector-tiering-v2 plan adopts,
  not accidental dead code.

- .planning/rfcs/unified-manifest-engine.md: adds the task #48
  unified poison-record policy tie-in — a future manifest engine's
  section decoders must adopt the replication policy verbatim
  (fail-closed per section with an INFO counter, never
  skip-and-continue past an undecodable section).

No behavior change; rename + docs only.

Gates: lib suite 4427 green; clippy -D warnings on default and
tokio,jemalloc feature sets; fmt.

Stacked on refactor/w5-typed-accessors (PR #400).

author: Tin Dang
@TinDang97
TinDang97 force-pushed the refactor/w6-hygiene branch from 5ec87fd to 80fb09a Compare July 20, 2026 05:37
@pilotspacex-byte
pilotspacex-byte merged commit 3cf6474 into main Jul 20, 2026
8 checks passed
@TinDang97
TinDang97 deleted the refactor/w6-hygiene branch July 20, 2026 05:38
TinDang97 added a commit that referenced this pull request Jul 20, 2026
…L fidelity (#404)

Patch release rolling up the storage-unification stacked train
(#396#401) and the follow-up db.rs directory split (#403).

Correctness: millisecond-TTL keys no longer expire up to 999 ms early
(CompactEntry stored expiry as ms/1000-floored seconds; now absolute
Unix ms end-to-end, exact PTTL readback, exact-ms RDB round-trips).

Unification (behavior-preserving, pinned by golden byte-spec tests):
one value codec behind RDB/spill/kv_serde with fail-closed corrupt
decode + DoS count guards on every path; one spill pipeline — sync
eviction batches victims into shared files (~N/256 manifest fsyncs
instead of N per-key) and retains unserializable victims fail-closed;
one eviction entry point (evict_to_budget + EvictionRun/EvictionSink,
was 13 variants / 5 reclaim-loop copies); one typed-accessor skeleton
(storage::db_kind static-dispatch markers); AofShardManifest rename;
db.rs split into db/{mod,hash_ttl,kv_ops,accessors}.rs.

Validation: same-VM A/B v0.8.1-vs-main — p=1 parity-or-better,
eviction-plain faster every paired round, spill +3%, p=16 within
noise. Release gate: crash-matrix nightly full matrix + ITERS=20
soak dispatched on the RC, green before tag (soak-first-then-tag).

Rolls CHANGELOG [Unreleased] into [0.8.2], bumps Cargo.toml/lock,
adds the RELEASES.md row, updates the README milestone table.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants