A second live query over a refetched on-demand source keeps a short joined window
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- data
Línea de trabajo
The payload names no source files, so start from the ordered-work oracle in #2132 and replay seed 3103989100, which is pinned as an it.fails case. Find where the second live-query Collection's ordered loader decides whether to request more rows after a refetch. The fix is done when that replay passes, the it.fails marker is removed, and the refetching-provider plus second-Collection combination can return to the random grammar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Two live-query Collections can read the same on-demand source. After a refetch, the second Collection can show a short ordered window. It stays short until a different change starts a load.
The ordered-work oracle in #2132 found this with a generated history. The failure also occurs with the production code on main, so #2132 does not cause it.
Minimal trace
- On-demand source with a refetching provider. The provider sends no change until a refetch, and each refetch keeps every served ordered range whole.
- Query: rows
LEFT JOINmarkers on the row's join key (link),WHEREthe marker exists,ORDER BY rank ASCwith an index onrank. - Collection A has
limit 2. Collection B (the second live-query Collection) haslimit 3. - Rows 9, 0 and 1 have rank 0 and a marker. Row 2 has rank 1 and no marker. 200 filler rows have rank 100 and up, with markers.
Steps:
- The backend inserts row 10, with rank 1 and no marker. The provider does not send it yet.
- Row 0 changes its join key, so it no longer matches a marker. The provider does not send this yet.
- The provider refetches.
Expected window of Collection B: ranks [0, 0, 100] (rows 9, 1 and the first filler row). Actual window: [0, 0]. Collection A shows the expected window.
Ingredients
The failure needs all of these:
- A refetching provider. A forwarding provider passes.
- A second live-query Collection on the same source. One Collection with
limit 3passes. - A join on the row's join key. The same history with marker changes passes.
- A tie at the window boundary with a row that the provider never sent. Without the insert of row 10, the history passes.
A source filter instead of a joined filter also passes.
Hypothesis
After the refetch, row 0 leaves both windows in one commit. Collection B must load past the rank-1 tie group, where every row fails the join. Two causes are possible:
- Collection B's ordered loader does not request again, because its last page has the same count and boundary as before.
- The rows that Collection A already loaded answer the request of Collection B.
Then nothing proves the window, and no request follows.
Evidence
- Witness trace: oracle seed 3103989100 of the ordered-work oracle in #2132. #2132 pins it as an
it.failsreplay, and excludes the refetching-provider and second-Collection combination from the random grammar until this fix.
This issue was written by Isaac.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.9k
- Forks
- 272
- Merge medio
- 1 d 48 min
- PR fusionados (30 d)
- 238
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/db
-
Ordered, limited live query over a string key commits `loading` first (and `orderBy().findOne()` since 0.11.1)Posiblemente ocupada @KyleAMathews la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 58/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/db
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
stellar/stellar-dev-skill#151 ·
Los mantenedores suelen responder en 1 día
-
Trial & Error: guided Blind offer squeezes on phones and sits under the touch toolbar on iPadAbiertoarea:arcade game ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
fderuiter/deruiter.dev#2281 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
scope: data grid type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vicharanashala/ajrasakha#1439 ·
Los mantenedores suelen responder en 1 día
-
Add: TV5Monde AsieAbiertoapproved check:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día