-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core Data: Adds 'include' to the query key #34583
Conversation
Size Change: +6 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
I think this also fixes #32594. I'm no longer able to reproduce the issue using the steps described here - #32594 (comment). But I think the issue with |
This looks good to me.
Do you mind clarifying a bit more here, I'm not sure what this refers to. Do you know why the "include" was excluded from the key initially (I guess maybe related to smart behavior we removed in the previous PR) |
Sorry for the confusion. Comment about I tracked down the original problem to the The But I think you're right. It was excluded because of the smart logic we removed in the previous PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes a lot of sense to me.
Obviously these internals are pretty impactful and sometimes fragile. I wonder if there's a way for us to provide a test that avoid regression on a higher-level (not sure how though)
Thanks again for the review and feedback, @youknowriad
Agree. This is worth exploring. I'll what I can do in the near future. |
Description
Adds
include
argument to the query key (stableKey
). Trying to useitemIds
from the default stable key cache turned out to be problematic.TL;DR - Two requests with different include values cannot have the same results.
Details - #34034 (comment).
P.S. Should we consider a different "hashing" method for
stableKey
. For example, querying withinclude
array size of 100 would result in key something like this:Fixes #34506.
How has this been tested?
Unit tests should be passing.
Can be tested in browser console using following snippet
Types of changes
Bugfix
Checklist:
*.native.js
files for terms that need renaming or removal).