-
Notifications
You must be signed in to change notification settings - Fork 129
Fix deduplication of limited subset requests #914
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
Fix deduplication of limited subset requests #914
Conversation
Co-authored-by: sam.willis <sam.willis@gmail.com>
|
Cursor Agent can help with this pull request. Just |
🦋 Changeset detectedLatest commit: 91341b8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: +31 B (+0.04%) Total Size: 87 kB
ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
Co-authored-by: sam.willis <sam.willis@gmail.com>
Co-authored-by: sam.willis <sam.willis@gmail.com>
Co-authored-by: sam.willis <sam.willis@gmail.com>
KyleAMathews
left a comment
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.
Lgtm
|
🎉 This PR has been released! Thank you for your contribution! |
I've tested this with the Linearlarge demo #891 and it fixes the same bug in that
🎯 Changes
Fixes a bug where
DeduplicatedLoadSubsetincorrectly deduplicated queries with differentwhereclauses when the superset had alimit.The
isPredicateSubsetfunction was updated to requirewhereclauses to be equal (not just a subset) when the superset query includes alimit. This prevents scenarios where a filtered, paginated query (e.g., with a search term) is incorrectly considered a subset of a broader, paginated query (e.g., without a search term), leading to stale data.New tests were added to
predicate-utils.test.tsandsubset-dedupe.test.tsto cover this specific bug and ensure correct behavior for limited queries.✅ Checklist
pnpm test:pr.🚀 Release Impact