[Bug]: Ghost view rows persisting after their corresponding docs have been purged
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
- 40/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- erlang, javascript
Direzione di ricerca
The issue includes a detailed reproduction script. Start by running the script to confirm the ghost rows. Examine the view indexing logic in the CouchDB source, likely in the view server or indexer modules. Look for how purges interact with view updates. The goal is to understand why rows persist after purges and ensure they are cleaned up during normal operations.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version
3.5.2
Describe the problem you're encountering
I am seeing view row ghosts when I purge large amounts of documents, while querying the view in between purge batches. These ghost rows return doc: null when queried with include_docs=true, and they never go away, they survive new docs being pushed and compaction. Only a full index rebuild seems to remove them.
The view reports that it caught up with the purges.
Expected Behaviour
I would expect the view to never return rows with no docs, or at least to heal after some point.
Steps to Reproduce
Repro script available here: https://gist.github.com/dianabarsan/5e21753d6545e6f61429ed31ebe79714
- create throwaway db
- create one design doc and one view that would index every doc
- seed db with 300k documents
- with a batch size of 1000, purge all documents, querying the view after each batch
- after all docs are purged, query the view and inspect the results
Sample result:
CouchDb 3.5.2, 300000 docs, purging 1000 at a time, querying view after each batch
attempt 1: 543 ghost view rows
db doc_count 0
db purge_seq 300000-g1AAAAIdeJx90C0OwkAQBeAJIDEILoEgFIOEGxBo5wD9Ec2mgYQEjeIIlVhoh-BxgOAACDgEZ6BdZqd-dsUT871NZjMA6KbtBHrxehunSTTzxpPhiK-X8ai16sCJ6Mth-ZgIIHzqfIn45jhyS_he55W1N44Ft4RvdF4QEcePW8LnOvcR82YFEn5ReLSztm4WyAXfNWyISteohL40ioiB84XQq0an_MnO-0LPGh3wTs7XQg8a7fOLzpdCPwoNweFA3MP8AXUdop0
view purge_seq 300000
view query result:
{
total_rows: 543,
offset: 0,
rows: [
{ id: 'd32020', key: 'd32020', value: null, doc: null },
{ id: 'd32024', key: 'd32024', value: null, doc: null },
{ id: 'd32028', key: 'd32028', value: null, doc: null },
{ id: 'd32034', key: 'd32034', value: null, doc: null },
{ id: 'd32069', key: 'd32069', value: null, doc: null },
{ id: 'd32071', key: 'd32071', value: null, doc: null },
{ id: 'd32075', key: 'd32075', value: null, doc: null },
{ id: 'd32079', key: 'd32079', value: null, doc: null },
{ id: 'd32092', key: 'd32092', value: null, doc: null },
{ id: 'd32096', key: 'd32096', value: null, doc: null },
... 533 more items
]
}
What I see in Fauxton:
https://github.com/user-attachments/assets/caec4929-ebe1-4910-bc5b-d566e31ad6a4
Your Environment
Manjaro Linux, CouchDb 5.3.2 in Docker
Additional Context
No response
- Lingua principale
- Erlang
- Stelle
- 7k
- Fork
- 1.1k
- Merge medio
- 10h 25m
- PR unite (30g)
- 35
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- 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 apache/couchdb
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
apache/couchdb#6166 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Fix: Warning: 'catch ...' is deprecated; please use 'try ... catch ... end' insteadForse di nuovo libera @devx-arjun l’ha presa 13 giorni fa e non c’è nessuna pull request aperta. Apertabeginner-friendly build chore patches-welcome
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
apache/couchdb#6144 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
apache/couchdb#6132 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[ENHANCEMENT]: Add seq checkpoints to continuous feedsForse già presa @nickva l’ha presa 6 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
apache/couchdb#6120 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/couchdb
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/rocketmq-dashboard#7250 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
HarperFast/rocksdb-js#945 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycleForse già presa @tarunagnihotri534 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Missing example coverage: getClockForse già presa @camunda-sdk-automation l’ha presa oggi. Apertanew-operations
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
camunda/orchestration-cluster-api-go#75 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vitest-dev/vitest#11656 ·
I maintainer di solito rispondono entro 1 giorno