Repository navigation
Conversation
Every periodic refresh calls store.refresh_registry() and then VectorStoreRegistry.refresh(), which listed feature views with the default allow_cache=False. That fetched the full registry from its backend a second time right after the first fetch, doubling registry backend reads (S3/GCS downloads, SQL queries, gRPC calls) and the chances of a failed refresh, even for servers with no vector-indexed feature views. List feature views with allow_cache=True so the vector store registry reads the copy the store just refreshed. Registries fill their cache when they are created, so the initial VectorStoreRegistry build in get_app() also reads a loaded registry. Signed-off-by: Youngbeom Choi <helloybz@gmail.com>
There was a problem hiding this comment.
🔍 Devin Review: 3 flags
Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Signed-off-by: Youngbeom Choi <helloybz@gmail.com>
franciscojavierarceo
left a comment
There was a problem hiding this comment.
the explicit FeatureStore.refresh_registry() call still reloads the backend before the vector mapping reads its cache. the file registry's TTL/mtime checks and the SQL registry's cache_mode='none' path remain in effect. the new real-registry regression observes one backend fetch during lifespan startup.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7220 +/- ##
==========================================
+ Coverage 54.10% 54.13% +0.03%
==========================================
Files 467 467
Lines 58940 58940
Branches 8688 8688
==========================================
+ Hits 31890 31908 +18
+ Misses 24892 24868 -24
- Partials 2158 2164 +6
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
What this PR does / why we need it:
Each registry refresh of the feature server (at startup and then on every
registry_ttl_seccycle) callsstore.refresh_registry()and thenVectorStoreRegistry.refresh().VectorStoreRegistry.refresh(), added in #6121, lists feature views with the defaultallow_cache=False, so it reads the registry backend again right after the store refreshed from it. With a file-based registry (local, S3, GCS), every cycle downloads the registry file twice. With the SQL registry, every cycle runs a feature view query on top of the full reload. With a remote registry, the registry server reads its own backend again instead of answering from the cache that the precedingRefreshcall updated. This happens on every feature server, including servers with no vector-indexed feature views, where the second read finds nothing to index. Each extra read is also one more chance for a cycle to hit a transient backend error.VectorStoreRegistry.refresh()now lists feature views withallow_cache=Trueand reads the copy the store just refreshed. The initial build inget_app()also reads a loaded registry, becauseRegistryandCachingRegistryfill their cache when they are created. Withcache_mode="none",allow_cache=Truestill reads the backend, as before.Only
VectorStoreRegistry.refresh()changes.Which issue(s) this PR fixes:
No existing issue. I searched open and closed issues and PRs for
VectorStoreRegistryand registry refresh.Checks
git commit -s)Testing Strategy
New test
test_registry_refresh_reads_the_registry_store_onceinsdk/python/tests/unit/test_feature_server.py: starting the app runs one registry refresh, which should call the registry store'sget_registry_protoonce. Fails on master withassert 2 == 1and passes with this change.make test-python-unitpasses locally (4460 passed, 37 skipped), andruff check,ruff formatandmypyare clean on the changed files.Misc
#7219 fixes another problem in the same refresh cycle: a failed periodic refresh stopped all later refreshes. The two PRs touch different parts of the code; I checked that they merge cleanly together and that the tests of both pass.
This change was written with help from an AI assistant (Claude Code). I reviewed it and ran the tests above.
🤖 Generated with Claude Code