Repository navigation
fix(cache-warming): Expire the completed gap backfill after 30 days - #3110
Merged
Merged
Conversation
A completed run kept its key with no TTL, so gap lists that expired while warming was off never got history again. Give the key the gap list TTL, so a heartbeat checks for empty segment lists again about once a month. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 10, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87b3cfe. Configure here.
Contributor
|
210 screenshot changes — 0 changed · 210 added · 0 removed |
… expire A done value written before this change has no TTL, and a heartbeat returns when the claim fails, so it is never overwritten. Use a v2 key. Existing installs run the backfill once more, and it fills only empty segments. Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 10, 2026
This branch was successfully deployed
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.

Follow-up to #2944, from the review question there.
A completed backfill set
junior:cache_warming:backfill:work_statetodonewith no TTL. If warming stays off for more than 30 days, the gap lists expire but the key stays, so the backfill never fills them again.The backfill now uses
junior:cache_warming:backfill:work_state:v2, and itsdonegets the gap list TTL (GLOBAL_GAPS_TTL_MS). The old key is ignored: a heartbeat returns when the claim fails, so an olddonewith no TTL would never be replaced. Existing installs run the backfill once more after deploy, and that run fills only segments that are empty. A fresh install and a long-lived install both check for empty segment lists again about once a month. Between checks, a heartbeat still makes only one state call. A rerun fills only lists that are empty when it starts, so lists with live gaps do not change.The existing backfill test now sets the old key to
donewith no TTL, and checks that the backfill still runs and that its new key is there just before the TTL and gone at the TTL. Without the fix, the test fails. The docs bullet inconfig-and-env.mdnow says the fill repeats after 30 days.tsc --noEmitand the fullpnpm lintpass. The backfill, heartbeat, and heartbeat-timers tests pass.via @BYK.
--
View Session [Sentry]