Ordered window starts two full-source reads after a signalling refetch with a NaN boundary
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Read ARCHITECTURE.md alongside the ordered-work oracle at packages/db/tests/query/ordered-work-oracle.property.test.ts, then reproduce the reported seed with the oracle and config from #2194 using the provided Vitest command. Trace why this counterexample starts two full-source reads after a signalling refetch and decide, according to ARCHITECTURE.md, whether the law or loader should change; done when the chosen behavior is justified and the reported assertion passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
An ordered live query issues two full-source reads after one signalling refetch. The law in the ordered-work oracle allows one. The window is descending with nulls: first, an anti-joined marker filters it, and one source row has a NaN rank, so the bounded boundary cannot be expressed.
The failure is on main. #2194 does not cause it. It changes the oracle's generator, so the seed reproduces only with the oracle file from #2194.
Law
The ordered-work oracle (packages/db/tests/query/ordered-work-oracle.property.test.ts) checks this rule: after a signalling refetch, the loader starts at most one full-source request. #2194 makes the law skip a bounded read that ends on a null or NaN rank, because ARCHITECTURE.md sends that boundary to the full-source fallback. Here the loader starts two full-source requests, not one.
Reproduce
- Check out
main(tested at 501b4813c). - Copy
packages/db/tests/query/ordered-work-oracle.property.test.tsandpackages/db/tests/oracle-config.tsfrom theordered-loader-ledgerbranch (#2194). - From
packages/db, run:
TANSTACK_DB_ORACLE_SEED=-1142653059 npx vitest run --coverage.enabled=false \
tests/query/ordered-work-oracle.property.test.ts \
-t "keeps rows and per-change work bounded"
Result:
AssertionError: full-source requests after a signalling refetch at step 2: expected 2 to be 1
Counterexample:
{"path":"on-demand","provider":"refetch-signal","latency":"immediate","cancellation":"cooperative","peer":false,"filter":"anti-joined","via":"marker","indexed":false,"direction":"desc","nulls":"first","terms":1,"limit":2,"offset":0,"initial":[{"id":0,"rank":0,"eligible":true},{"id":2,"rank":NaN,"eligible":true},{"id":1,"rank":0,"eligible":false}],"history":[{"type":"delete-visible"},{"type":"move","offset":0,"limit":1}]}
Open question
The cause is not known yet. There are two possible causes:
- The exemption in the law is too narrow for a
NaNrank at the start of a descending,nulls: firstorder. - The loader starts a second full-source read that it does not need.
A fix must decide which one, with ARCHITECTURE.md as the authority, before it changes the law or the loader.
This issue was written by Isaac.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.9k
- Forks
- 277
- Merge medio
- 18 h 7 min
- PR fusionados (30 d)
- 228
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/db
Issues similares
-
[Feature]: 建议导入源后,自动切换到新导入的源Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
lyswhut/lx-music-desktop#3026 ·
-
area: ci type: test
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
schlessera/brain-kit#2769 ·
Los mantenedores suelen responder en 1 día
-
Read a vector index's quantization back on Neo4j 2026.10, which reports vector.quantization.typeAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liberation-data/drivine#231 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
alveusgg/alveusgg#2502 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug workspace/linguist
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
backstage/community-plugins#11698 ·
Los mantenedores suelen responder en 3 días