Skip to content
Source
Sign inSign up
TanStack/db

fix(db): preserve exact D2 rows during sync reconciliation #1794

Closedobeattie(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/1794/headopened

Showing 5 changed files with 27 additions and 24 deletions (loading 2).

x
0 of 5 viewed, 5 left
5 additions and 0 deletions.changeset/sixty-nights-refuse.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/db': patch
+---
+​
+Fix live queries throwing when updating an optimistically inserted row after synchronous sync confirmation.
12 additions and 13 deletionspackages/db/src/query/effect.tsModified
View file
@@ -17,7 +17,7 @@
computeSubscriptionOrderByHints,
extractCollectionSources,
extractCollectionsFromQuery,
- filterDuplicateInserts,
+ prepareChangesForD2,
sendChangesToInput,
splitUpdates,
trackBiggestSentValue,
@@ -388,10 +388,10 @@
​
// Subscription management
private readonly unsubscribeCallbacks = new Set<() => void>()
- // Duplicate insert prevention per lexical source
- private readonly sentToD2KeysBySource = new Map<