Ordered loader: a page-capping provider loses a moved row from a joined window after refetch
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- databases
Direzione di ricerca
Start with the pinned it.fails test in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts, which encodes the eight-step history against a provider with pageCap 2. Run it to see the failure 'window after refetch at step 3 was []; expected [7]', then trace where the ordered loader's repair path treats a short page as exhaustion. Read PR #2154 on branch fix-query-db-refetch-ordered-gap first. Done when the test passes without the it.fails marker and the refetch oracle's generated scenarios accept pageCap.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
With a provider that returns fewer rows than a request's limit (a page cap), an on-demand joined ordered window can lose a row after a refetch. The row's order changed, and the loader's own repair drops it. A short reply does not prove that the source is exhausted (glossary), so the loader must keep reading.
Reproduction
The pinned witness is a capped provider keeps a moved row in the window after a refetch (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.
- Provider: cursor encoding,
pageCap: 2. - Query:
rank desc,offset 1,limit 2, LEFT-joined marker filter. - Initial rows: id 0 (rank 1, marked), id 1 (rank 0, unmarked).
- History:
- Mark id 7.
- Upsert id 2 at rank 1.
- Upsert id 7 at rank 0.
- Refetch.
- Delete id 3.
- Invalidate.
- Upsert id 3 at rank 1.
- Upsert id 0 at rank 0.
Failure: window after refetch at step 3 was []; expected [7].
Scope
This reproduces on main, through the loader's own repair. It is separate from #2136. The query-db refetch oracle's generated campaigns use an uncapped provider because of this defect. A page-capped trace together with a peer live query also fails (found while #2154 was reviewed). That trace fails the same way with the loader's first-page skip disabled.
Suggested witness and owner
- Owner: the ordered loader. The repair and continuation path must treat a short page as "not exhausted".
- Witness: flip the pinned
it.failstest, then addpageCapto the query-db refetch oracle's generated scenario.
This issue was written by Isaac.
- Lingua principale
- TypeScript
- Stelle
- 3.9k
- Fork
- 272
- Merge medio
- 1g 21m
- PR unite (30g)
- 241
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à 5/5 Più di una settimana Idoneità per principianti 8/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 5/100
TanStack/db#2186 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
query-db: a Query refetch that joins a loader's refetch acquisition does not report shifted pagesAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
TanStack/db#2185 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
A live query's preload on an on-demand collection waits for any persisting optimistic transactionAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
melgarafael/DeskcommCRM#3000 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
callstackincubator/simlock#639 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
aws/agentcore-cli#2606 ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 7 giorni
-
ai-driven-qa bug Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno