You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: skip on-demand loading when no index exists for orderBy + limit queries (#1437)
* Reproduce problem without index
* fix: skip on-demand loading when no index exists for orderBy + limit queries
When auto-indexing is disabled (the new default), queries with orderBy + limit
would crash because loadMoreIfNeeded attempted cursor-based loading via
requestLimitedSnapshot without an index. Now dataNeeded is only set when an
index exists, and loadMoreIfNeeded also guards against missing indexes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: add changeset for orderBy + limit no-index fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: warn when orderBy+limit or lazy join falls back to full load due to missing index
Adds console warnings when no index is found for:
- orderBy + limit queries (order-by.ts)
- lazy join loading (joins.ts)
Both suggest creating an explicit index or enabling autoIndex: 'eager'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: orderBy + limit queries crash when no index exists
6
+
7
+
When auto-indexing is disabled (the default), queries with `orderBy` and `limit` where the limit exceeds the available data would crash with "Ordered snapshot was requested but no index was found". The on-demand loader now correctly skips cursor-based loading when no index is available.
0 commit comments