fix: discovery indexes the files of an index directory that a .codegraph link points to inside the repository
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
Direzione di ricerca
Start by tracing file discovery and checking how query.IndexDirs reports the resolved index directory. Reproduce the race with a .codegraph link to cg-real while repeatedly running the indexing command. Done means discovery skips the resolved index directory and its store, and indexing no longer reads live store files.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
Found while reviewing PR #374, which relates to #372. A test in #374 failed in 1 of 26 runs with this error, before its fixture was renamed:
lstat .../cg-real/store/OPTIONS-000008
File discovery skips .codegraph by name and skips names that start with a dot. It does not know that cg-real is the index. So it walks into the live Pebble store in cg-real/store. Discovery then races with Pebble's own file renames and deletes. The run can fail, or it can index store files.
What you expected instead
Discovery skips the resolved index directory and its store, as query.IndexDirs reports them, whatever their names are. Indexing through a .codegraph link to cg-real leaves the live store unread.
Steps to reproduce
- Create a repository with a directory named
cg-realthat holds the index. - Link the index:
ln -s cg-real .codegraph. - Run the indexing command repeatedly. The failure appeared in 1 of 26 runs.
A workaround is to name the link target with a leading dot, such as .cg-real. Discovery then skips it by name.
Version
Built from source at main.
Platform
macOS.
How did you install it?
Built from source
Languages in the affected repository
All languages.
Before submitting
- I searched existing issues and this is not a duplicate
- I checked the capability matrix and this is not a documented limitation
- This is not a security vulnerability
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 7h 42m
- PR unite (30g)
- 111
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 seanb4t/codegraph-go
-
chore needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
seanb4t/codegraph-go#380 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
seanb4t/codegraph-go#379 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query chore needs-triage spec-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
seanb4t/codegraph-go#377 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
seanb4t/codegraph-go#362 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
seanb4t/codegraph-go#355 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di seanb4t/codegraph-go
Issue simili
-
Add iterate GmbH domains to a dedicated list and include it in company and developer categoriesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
v2fly/domain-list-community#4307 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
notify: voice_queue rows are deleted only at startup, so a hub that stays up grows it without boundAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mattabate/life-distributable#232 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno