Repository navigation
Conversation
The proto_registry_utils caches keyed on id(registry_proto) and version_id. SqlRegistry leaves version_id empty. After a registry proto is freed, a new proto can get the same id, and the cache then returns objects from the old registry. For example, write_to_online_store validated a vector against a feature view from an earlier store and rejected valid rows. The caches now keep the proto and compare it by identity. Signed-off-by: jiwidi <[email protected]>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7085 +/- ##
==========================================
+ Coverage 50.97% 51.00% +0.02%
==========================================
Files 455 455
Lines 56994 56996 +2
Branches 8321 8321
==========================================
+ Hits 29055 29072 +17
+ Misses 25954 25938 -16
- Partials 1985 1986 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Signed-off-by: jiwidi <[email protected]>
The test depended on CPython giving the second proto the freed address of the first. It now patches id() in the module so both live protos share one id, and it covers all three cache decorators. Signed-off-by: jiwidi <[email protected]>
Thanks! Pushed a new commit for itt. The test now patches |
What this PR does / why we need it:
proto_registry_utilscaches its results byid(registry_proto)andversion_id.SqlRegistryleaves
version_idempty. After a registry proto is freed, a new proto can get the sameid(),and the cache then returns objects from the old registry. In our case
write_to_online_storevalidated a vector against a feature view from an earlier
FeatureStoreand rejected valid rows.The caches now keep a reference to the proto and compare it by identity. The
version_idandproject keys are unchanged.
Which issue(s) this PR fixes:
N/A
Checks
git commit -s)Testing Strategy
Unit tests
Integration tests
Manual tests
Testing is not required for this change
Unit: two live registry protos that share one
id()(patched in the module) each get their ownvalue from all three cache decorators. The test fails on the old code on every run.
The existing registry cache tests pass unchanged.
Misc
Found while running a streaming writer against the Milvus online store; independent of the Milvus
online store PRs.