-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
I've made a repro of an issue I've been seeing in my app where collections with functional where queries can stop syncing when multiple optimistic updates are queued simultaneously. The page needs to be fully reloaded when this happens, so it's a fairly serious issue for me.
Reproduction
https://stackblitz.com/edit/tanstack-db-init-ewe1mn4x Click the "Insert" button to see the issue:
- The collection without functional where queries continues displaying updates each second. ✓
- The collection with a functional where query throws errors which you can see in the console, and stops syncing. ✗

Logic
Both share the same logic:
- Insert two items simultaneously
- Wait for server sync before returning from
onInsert
- The (simulated) server then sends updates to each item once per second. Only the collection that has a functional where query registered breaks.
I've had difficulty tracing the internal flow here, so any help/advice if I'm doing something wrong in how I'm calling the APId would be appreciated. 🙏
Metadata
Metadata
Assignees
Labels
No labels