refactor(remote-config): Re-arm blob sources only when exhausted + in-memory blob-store index#3698
Merged
Merged
Conversation
Contributor
Author
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3698 +/- ##
==========================================
+ Coverage 80.52% 80.55% +0.03%
==========================================
Files 395 395
Lines 16278 16300 +22
Branches 2315 2318 +3
==========================================
+ Hits 13108 13131 +23
+ Misses 2244 2243 -1
Partials 926 926 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vegaro
approved these changes
Jul 2, 2026
760450f to
54e2307
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 54e2307. Configure here.
rickvdl
approved these changes
Jul 2, 2026
rickvdl
left a comment
Member
There was a problem hiding this comment.
Awesome! Thanks for iterating 🫶
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… miss Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0535058 to
fa9c39d
Compare
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.


Changes
restartIfExhausted(purpose)to the source provider: re-arms a purpose only if it is currently exhausted, otherwise a no-op that preserves failover progress.ensureDownloadednow re-arms exhausted blob sources before enqueuing, so a read after a prior cycle drained the sources retries instead of failing silently.RemoteConfigManager.prefetchBlobsre-arms blob sources only when exhausted rather than unconditionally every sync.RemoteConfigBlobStorekeeps an in-memory index of on-disk refs socontains/cachedRefsno longer stat the disk on every call.Note
Medium Risk
Changes hot-path blob cache checks and network source selection for remote config; behavior shifts from always retrying primary blob sources each sync to preserving failover state, which could delay recovery if exhaustion detection is wrong.
Overview
Remote config blob source failover no longer resets every sync or on every download.
restartIfExhaustedre-winds blob (and API) sources to the first entry only when that purpose has no healthy source left; otherwise failover progress is kept so a known-bad primary is not retried on each sync.On-demand
ensureDownloadedcallsrestartIfExhaustedbefore enqueueing a missing blob so reads after an exhausted cycle can retry recovered sources. Sync prefetch uses the same conditional re-arm instead of unconditionalrestart. Individual download workers still do not restart inside the failover loop (one re-arm per on-demand request or prefetch cycle).RemoteConfigBlobStoremaintains a synchronized in-memory ref index (lazy one-time disk scan, updated on write /retainOnly/clear).containsandcachedRefsavoid per-call disk stats;readdrops stale index entries when the file is missing.retainOnlystill scans the blobs directory so orphan temp and invalid-named files are removed.Reviewed by Cursor Bugbot for commit fa9c39d. Bugbot is set up for automated code reviews on this repo. Configure here.