Skip to content

fix: Prevent mutation of cached feature resolution results - #6721

Closed
junwoo-choi-rapportlabs wants to merge 0 commit into
feast-dev:masterfrom
junwoo-choi-rapportlabs:master
Closed

fix: Prevent mutation of cached feature resolution results#6721
junwoo-choi-rapportlabs wants to merge 0 commit into
feast-dev:masterfrom
junwoo-choi-rapportlabs:master

Conversation

@junwoo-choi-rapportlabs

Copy link
Copy Markdown

What this PR does / why we need it:

_get_cached_request_context() caches grouped_refs, including the mutable
requested-feature lists nested inside it.

The Redis online store appends an internal timestamp key to these lists while
preparing HMGET fields. Because cache hits returned the same nested lists,
timestamp keys could accumulate across requests, increasing Redis fields and
response post-processing work over time.

This change copies each requested-feature list at the request preparation
boundary before passing it to an online store. The cached resolution remains
shared, while downstream mutations become request-local.

image

Which issue(s) this PR fixes:

N/A

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant