Sorry, something went wrong.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: phil-park The full list of commands accepted by this bot can be found here. Details Needs approval from an approver in each of these files:Approvers can indicate their approval by writing /approve in a comment |
Sorry, something went wrong.
| else: | ||
| cache_value = func(registry_proto, project) |
There was a problem hiding this comment.
Don't you need to update cache_key here as well?
Sorry, something went wrong.
Sorry, something went wrong.
| def registry_proto_cache(func): | ||
| cache_key = None | ||
| cache_value = None |
There was a problem hiding this comment.
I'm not sure I understand this.. If you use the same annotation for multiple methods then the cache value needs have different shapes, such as List[FeatureService] or List[FeatureView] right? Is that going to work as expected here? Can we add tests?
Sorry, something went wrong.
There was a problem hiding this comment.
The context of the wrapper decorator is created whenever different argument functions (e.g list_feature_views, list_feature_services..) are called.
Therefore, when calling list_feature_views and when calling list_feature_services, different results are returned.
The operation of this cache is similar to Python's functools.lru_cache, but since the registryProto object is not hashable, it is implemented to hash using the object's id.
Sorry, something went wrong.
|
Okay, can you also sign off your commits? https://github.com/feast-dev/feast/pull/3702/checks?check_run_id=16298395815 |
Sorry, something went wrong.
|
I signed off the commit. Thank you for your review. |
Sorry, something went wrong.
|
@achals Does this PR need further review? |
Sorry, something went wrong.
There was a problem hiding this comment.
/lgtm
Sorry, something went wrong.
What this PR does / why we need it:
If you use File Registry, the registry file becomes heavy because materialize records are accumulated while a long period.
Even if the registry cache is enabled, performance degraded because each online feature lookup traverses the registry object and searches the meta.
As long as the registry_proto object does not change, you must avoid multiple lookups through the function-level cache.
Which issue(s) this PR fixes:
Fixes #3649 #3597