Skip to content
Source
Sign inSign up
TanStack/db

fix(sqlite-persistence): unblock first coordinated writes #1899

MergedKyleAMathews(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/1899/headmerged by KyleAMathews(GitHub profile, opens in a new tab)

Showing 5 changed files with 7 additions and 0 deletions (loading 4).

x
0 of 5 viewed, 5 left
7 additions and 0 deletions.changeset/fix-first-coordinated-write-route.mdAdded
View file
@@ -0,0 +1,7 @@
+---
+'@tanstack/db-sqlite-persistence-core': patch
+'@tanstack/browser-db-sqlite-persistence': patch
+'@tanstack/electron-db-sqlite-persistence': patch
+---
+​
+Request an existing leader's route before the first coordinated write, without sending the mutation. Let leader election finish during scheduled hydration, and reject writes queued under a former leader before persistence.
packages/browser-db-sqlite-persistence/tests/browser-coordinator.test.tsModified
View file
Loading the diff
packages/db-sqlite-persistence-core/src/broadcast-coordinator.tsModified
View file
Loading the diff