Skip to content

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

Open
junwoo-choi-rapportlabs wants to merge 1 commit into
feast-dev:masterfrom
junwoo-choi-rapportlabs:fix-context-cache
Open

fix: Prevent mutation of cached feature resolution results#6722
junwoo-choi-rapportlabs wants to merge 1 commit into
feast-dev:masterfrom
junwoo-choi-rapportlabs:fix-context-cache

Conversation

@junwoo-choi-rapportlabs

@junwoo-choi-rapportlabs junwoo-choi-rapportlabs commented Aug 10, 2026

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

Copy grouped feature lists before passing them to online stores so Redis
timestamp fields do not accumulate in the shared resolution cache.

Signed-off-by: rapportlabs <junwoo@rapportlabs.kr>
@junwoo-choi-rapportlabs
junwoo-choi-rapportlabs requested a review from a team as a code owner August 10, 2026 07:40
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