query-db: a Query refetch that joins a loader's refetch acquisition does not report shifted pages
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 8/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- data-engineering
Direção de pesquisa
The gate is in packages/query-db-collection/src/query.ts in recordOrderedPageResult, where acquisitionRefetches suppresses results for a hash. Read how the guard counts overlapping acquisitions and how a joined Query fetch differs from the acquisition's own result. The issue asks for a named replay in the query-db refetch oracle with two live queries; done means that replay fails before a fix and passes after it. Expect the fix to be a design change, not a one-line edit.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
Query DB does not report invalidateLoadedSubsets() for a Query refetch that joins a running refetch: true loader acquisition on the same Query hash. If that refetch shifts the page, other ordered live queries that rely on the page can keep a #2136-style gap.
Where
packages/query-db-collection/src/query.ts, recordOrderedPageResult. The gate skips a result while acquisitionRefetches holds its hash. This loop guard stops a repair's own result from starting another repair. Since #2154 (commit 0216c6026), the guard counts overlapping acquisitions, but it still cannot tell a joined user refetch from the acquisition's own result.
Shape of a trace (not yet reproduced)
- Loader A starts a bounded repair. Its
refetch: trueprefix acquisition on Query hash H is in flight. utils.refetch()orinvalidateQueriesruns. Query joins the in-flight fetch for H, after the backend changed.- The result for H has different keys and a later page follows it. Without the guard it would report.
- The guard suppresses the report. Loader A repairs its own window from the result, but loader B, whose window also used H's page, gets no report.
Status
No history in the query-db refetch oracle reaches this. The oracle's limits section and the coverage map record it.
Suggested witness
A named replay in the query-db refetch oracle with two live queries over the same pages. Hold one loader's repair acquisition, change the backend, run a Query refetch, then release. The coverage law should fail for the second live query if the defect is real. A possible fix: record the fetch that the acquisition started, not the hash, and report other fetches' results.
This issue was written by Isaac.
- Linguagem predominante
- TypeScript
- Estrelas
- 4k
- Forks
- 277
- Merge médio
- 17h 40min
- PRs com merge (30d)
- 223
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TanStack/db
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Garbage collection cleans up a collection while one of its transactions is still persistingTalvez já em andamento @Nabil372 assumiu há 1 dia. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
-
persistedCollectionOptions without a schema can't be passed to createCollection (follow-up to #1452)Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/db
Issues semelhantes
-
type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
0️⃣ phase/new
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 70/100
microsoft/playwright#43640 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100