Skip to content
Source
Sign inSign up
TanStack/db

fix(db): recover a live query's demand when its source recovers from error #2129

ClosedKyleAMathews(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromfix/source-error-recoveryopened

Showing 8 changed files with 31 additions and 13 deletions (loading 5).

x
0 of 8 viewed, 8 left
5 additions and 0 deletions.changeset/source-error-demand-recovers.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/db': patch
+---
+​
+A live query now recovers when a source Collection errors and then becomes ready again. Before, a subset load that rejected because its source entered `error` put a query with a join or include into a terminal error, and a direct query became ready on recovery without loading its subset again. The load is now requested again when the source recovers, and the query becomes ready when that load settles. A load that rejects while its source is healthy still puts the query in error.
25 additions and 12 deletionsdocs/contributing/oracle-reviews/progressive-source-readiness.mdModified
View file
@@ -297,20 +297,33 @@
​
## Open cells
​
-- TrailBase on-demand: a change committed between a subset fetch and the
- change subscription can be missed. The owner is
- `packages/trailbase-db-collection/tests/ORACLE.md`. This predates the change.
-​
+- **Fixed: TrailBase on-demand.** A load now waits for the change
+ subscription before it fetches, so a query is not ready before the
+ subscription and a change after the fetch is kept.
+ `packages/trailbase-db-collection/tests/ORACLE.md` owns the law and its
+ remaining limits.
- Effect `skipInitial` over an ordered window or an include child has no lane.
- Vue, Svelte, and Angular have no Suspense surface in the shared suite.
-- A persisted follower tab's load may settle before the leader's rows apply
- in that tab. Only the two-tab OPFS e2e suite can show this; it has not run.