chore(graphstore): collapse the four full-scan edge index builders into one
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with the four edge index builders: BuildReverseAdjacency and BuildImplementsIndex in internal/query/traverse.go, buildReverseAdjacency in internal/indexer/sync.go, and buildContainsIndex in internal/query/traverse.go. Add one graphstore function that takes the edge kinds to keep, keep the Source sort for implements, and point the call sites at it, including the eight listed in the issue. Done means task test passes and the golden files are unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What kind of chore?
Repository housekeeping
What needs doing?
Four functions build an in-memory edge map from one full IterateEdges("") scan, keyed by edge.Target:
query.BuildReverseAdjacencyininternal/query/traverse.go:31keeps onlycallsedges.query.BuildImplementsIndexininternal/query/traverse.go:369keeps onlyimplementsedges and sorts each list bySource.buildReverseAdjacencyininternal/indexer/sync.go:614copies the first function. Its comment says the copy exists because aninternal/querytest import ofinternal/indexerforms an import cycle.query.buildContainsIndexininternal/query/traverse.go:401is a fourth full scan. It keeps onlycontainsedges, keys them byedge.Sourceand folds overload sets into a method-owner map, so it needs a parameter for the key as well as for the kinds.
Add one graphstore function that takes the set of edge kinds to keep. Keep the Source sort for implements, so list order does not change. Point the seam at internal/query/traverse.go:61 and the call sites at the new function. BuildReverseAdjacency has five callers outside the seam (internal/query/seeding.go:186, internal/query/expand.go:486, internal/query/traverse.go:757, 853 and 981). BuildImplementsIndex has three (internal/query/traverse.go:761, 857 and 985).
Run task test before the pull request. Each golden file stays the same.
Why now?
Decision D11 of the bounded-index-memory change (#271) gives the sync copy a set of edge kinds and leaves query unchanged. Task 6.1 then carries a second copy of the same algorithm. Collapsing the functions first means task 6.1 adds the edge-kind parameter to one function. The change's workflow follow-up asks for this issue.
Does this touch anything load-bearing?
- The release pipeline (
release.yml,.goreleaser.yaml, signing) - The upgrade identity (
internal/upgrade/verify.go) - The perf baseline (
tools/bench/baseline.json) - The graph schema / meta-key layout
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
🤖 Generated with Claude Code
- 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