Repository navigation
revert(cache): remove opt-in remote-origin prewarm from #1510 - #1522
Merged
Merged
Conversation
PR #1510 bundled five changes; this removes only the `cache.prewarm` feature (its item #1) and leaves the other four intact — the #1470 `Candidate.stake: u64` change, the #1475 metric sibling-counter convention docs, and the #1504/#1508 watcher-drift fixes. Removed: - `CacheEngine::prewarm` / `prewarm_cancellable` / `prewarm_pinned` and the `PrewarmReport` / `PrewarmOutcome` / `FillOwnership` types. `populate_inner` reverts to `CacheResult<()>` (the `FillOwnership` metering existed only to feed prewarm's coalesced-vs-fetched counts). - The four `decdn_cache_prewarm_*` counters. - `cache.prewarm` config field, `DEFAULT_PREWARM`, `prewarm_enabled_for`, and the `decdn config validate` / template reporting of the flag. - Startup prewarm spawn, shutdown cancellation, and the reload-time single-flight warm machinery (`warm_in_flight` / `warm_dirty` / `warm_wanted` / `prewarm_stop`). - The prewarm integration-test file and all prewarm unit tests, plus the observability-appendix rows and CHANGELOG entry. Kept (per request): the oversized-pin-set warning (`warn_if_pins_exceed_cache`), which is independent of prewarm — it runs unconditionally at startup and on reload. The reload path reverts to a plain detached `rescan_origins` + budget-warn spawn. The `fs_rescan_interval_sec` `config validate` reporting (a #1508 drift fix) is also kept. Verification: cargo build, clippy --all-targets, fmt --check clean; cache/common/cli 1096 tests and node 897 tests pass; anvil-e2e compile gate and RUSTDOCFLAGS=-D warnings doc clean. Co-Authored-By: Claude Opus 4.8 <[email protected]>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (16)
💤 Files with no reviewable changes (10)
WalkthroughChangesCache prewarming removal
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Runtime
participant CacheEngine
participant PinWarning
Runtime->>PinWarning: check pinned size at startup
Runtime->>CacheEngine: rescan_origins() on reload
CacheEngine-->>Runtime: rescan result
Runtime->>PinWarning: check pinned size after reload
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Coverage reportTotal: 80.11% (was 80.17%, ▼ 0.06%) — 53910/67291 lines
History
|
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.
Removes the
cache.prewarmfeature that landed as item #1 of #1510, while leaving that PR's four other changes intact — the #1470Candidate.stake: u64change, the #1475 metric sibling-counter convention docs, and the #1504/#1508 watcher-drift fixes.What prewarm was
An opt-in flag that, on
http/s3origins, pulledcache.pinned_hashesinto the store at startup and ondecdn node reloadso the first request for pinned content didn't pay full pull-through latency. It never shipped in a tagged release.Removed
CacheEngine::prewarm/prewarm_cancellable/prewarm_pinnedand thePrewarmReport/PrewarmOutcome/FillOwnershiptypes.populate_innerreverts toCacheResult<()>; theFillOwnershipmetering existed solely to give prewarm a coalesced-vs-fetched distinction, sopopulate/populate_localreturn to plain().decdn_cache_prewarm_{blobs,bytes,refused,failures}_totalcounters and their observability-appendix rows.cache.prewarmfield,DEFAULT_PREWARM,prewarm_enabled_for, and thedecdn config validate/config inittemplate reporting of the flag.warm_in_flight/warm_dirty/warm_wanted/prewarm_stop). The reload path reverts to a plain detachedrescan_originsspawn.crates/cache/tests/prewarm.rsintegration suite, all prewarm unit tests, and the CHANGELOG entry.Kept (deliberately)
warn_if_pins_exceed_cache) — independent of prewarm (a pin set larger thancache.cache_size_mbstarves the LRU driver on any node), so it stays and runs unconditionally at startup and on reload.fs_rescan_interval_secinconfig validate— a feat: origin-aware discovery — advertise origin-held content before pull-through (#1130) #1508 drift fix, unrelated to prewarm.Verification
cargo build,cargo clippy --all-targets,cargo fmt -- --check— clean.cargo nextest run— decdn-cache/common/cli 1096 passed, decdn-node 897 passed.cargo test --no-run -p decdn-e2e --features anvil-e2e— compiles.RUSTDOCFLAGS="-D warnings" cargo doc --no-deps— clean for cache/common/node.🤖 Generated with Claude Code
Summary by CodeRabbit
Removed Features
cache.prewarmconfiguration option; configurations using it are no longer accepted.Bug Fixes