Ordered loader: an offset-only provider leaves a joined on-demand window empty at preload
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- databases, typescript
Direzione di ricerca
The defect lives in packages/db/src/query/live/ordered-source-loader.ts, where the continuation offset is repeated and capped at the window size; read ARCHITECTURE.md "Ordered requests, continuation, and recovery" first. Start by running the pinned it.fails test in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts (PR #2154 branch). Done means that test passes as a normal test and the oracle's generated scenarios also cover encoding: offset.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
An on-demand ordered live query with a joined filter shows an empty window at preload when the provider honors offset but not cursor. LoadSubsetOptions allows either encoding.
Reproduction
The pinned witness is an offset-only provider fills a joined window at preload (known loader defect) in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts (branch fix-query-db-refetch-ordered-gap, PR #2154). It is an it.fails test today.
- Source: an on-demand Query Collection whose
queryFnapplieswhere, sorts, skipsoffsetrows and applieslimit. It ignorescursor. - Query:
rank desc,limit 1, LEFT join to a marker Collection, keep rows that have a marker. - Rows: ids 0, 1, 2, all rank 0. Only row 0 has a marker. With one order term the fixture rank is
rank * 100 + id, so the order is 2, 1, 0.
Expected window: [0]. Actual window: [] (expected [] to deeply equal [ +0 ]).
Cause (from the oracle's notes, not yet traced in detail)
The loader repeats a continuation offset that it caps at the window size. The offset-only provider then answers the same rows again, and the loader never reaches row 0.
Scope
This reproduces on main. It is separate from #2136. The query-db refetch oracle's generated campaigns use a cursor provider only, because of this defect.
Suggested witness and owner
- Owner: the ordered loader (
packages/db/src/query/live/ordered-source-loader.ts). Read ARCHITECTURE.md "Ordered requests, continuation, and recovery" first. - Witness: flip the pinned
it.failstest to a normal test. Then let the query-db refetch oracle's generated scenario chooseencoding: offsettoo.
This issue was written by Isaac.
- Lingua principale
- TypeScript
- Stelle
- 4k
- Fork
- 277
- Merge medio
- 18h 49m
- PR unite (30g)
- 224
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/db
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
OfflineExecutor.dispose() never settles pendingTransactionPromisesForse già presa @Claire-ovo l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TanStack/db#2254 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
VictoriaMetrics/victorialogs-datasource#747 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
bug from-studio
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
esengine/DeepSeek-Reasonix#14608 ·
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getarcaneapp/arcane#4590 ·
I maintainer di solito rispondono entro 1 giorno
-
支持对已取消(cancelled)任务生成报告Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
Clouditera/VulnHunter#57 ·